I'm getting the following error when I run the azure function from visual studio.
A ScriptHost error has occurred [1/19/2018 6:40:52 AM] The listener
for function 'MyFunctionName' was unable to start.
Microsoft.WindowsAzure.Storage: Server encountered an internal error.
Please try again after some time.
When I run from the command prompt by running func host start
command. I get the following warning. and then it gets stuck on
Host lock lease acquired by instance ID
.
No job functions found. Try making your job classes and methods
public. If you're using binding extensions (e.g. ServiceBus, Timers,
etc.) make sure you've called the registration method for the
extension(s) in your startup code (e.g. config.UseServiceBus(),
config.UseTimers(), etc.).
Azure function version: azure-functions-core-tools@2.0.1-beta.22
I'm using Storage Accounts Blob containers and queues.
I'm connecting to Development Storage account, I have checked it that storage emulator is started.
{
"IsEncrypted": false,
"Values": {
"ConnectionStrings:Default": "Server=.\\SQLEXPRESS; Database=TestDb; Trusted_Connection=True;",
"ConnectionStrings:BlobStorageAccount": "UseDevelopmentStorage=true",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
}
}
FYI.
It was working fine before, But I have got this message in Visual Studio.
your license has gone stale and must be updated. Check for an updated
license to continue using this product
So I just deleted the %localappdata% and %temp%, then I tried to run Azure function and after this, I have started getting
The listener for function was unable to start error
So is it related to my visual studio subscription or I mistakenly deleted any required file? Or is this related to something else?
Best Answer
For anyone that is encountering this issue the following may help...
Azure Durable Functions rely on TableStorage, and the latest version of Azurite (v3) currently doesn't support TableStorage. As such, pull the Azurite repo and switch to the
legacy-master
(v2) branch and then runnpm run start
.