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: [email protected]
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?
if you are running via storage emulator locally then run func settings add AzureWebJobsStorage UseDevelopmentStorage=true
in local.settings.json
and if with a normal Azure Storage connection string using func, must set the AzureWebJobsStorage in local.settings.json
for more view
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 run npm run start
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With