I am getting below error while trying to debug an azure function, which is triggered every 30 secs and creates a file and uploads it on Azure storage account (using Azure Storage Emulator for development).
The listener for function 'Test' was unable to start. mscorlib: One or more errors occurred. Microsoft.Azure.WebJobs.Host: Please verify that the Azure Storage Emulator is running. Microsoft.WindowsAzure.Storage: The remote server returned an error: (500) Internal Server Error
Although the Azure Storage Emulator is up and running. Below is the my local.settings.jason -
Any pointers please?
Since you use a locally virtualized Storage Emulator, then your Connecting String is correct.
If your firewall restricts func from accessing the Storage Account, then this error may be reported. The firewall is one of the reasons that the listener cannot access the virtual Storage Emulator.
When running the function locally, all triggers except httptrigger need to use the Storage Emulator. If the firewall restricts the listener's access to virtual storage, problems can occur when performing functions.
Try disabling the firewall and see if that resolves the issue.
Of course, it is also possible that the Storage Emulator service is not open. Try typing
in cmd to check the status.
If it returns false, enter the following command to start the Storage Emulator:
To sum up:
This type of problem is generally for three reasons.
1.Connection string error prevents connection,
2.firewall is set
3.some services are not turned on.
Have a look of the doc:
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator#start-and-initialize-the-storage-emulator
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator#storage-emulator-command-line-tool-reference