Reputation: 4759
I am working in durable functions in Vs2022. it was all working fine till this noon. Suddenly it starts saying
The listener for function 'Orchestration' was unable to start. DurableTask.AzureStorage: The response ended prematurely, with at least 91 additional bytes expected. Microsoft.WindowsAzure.Storage: The response ended prematurely, with at least 91 additional bytes expected. System.Net.Http: The response ended prematurely, with at least 91 additional bytes expected.
I really got confused what really happened to it which was working fine for more than couple of months.
Here is my local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsSecretStorageType": "files",
"environment": "Development",
}
}
My VS2022 version is 17.2.6
Kindly note, I am working in a company VM where I dont have any admin rights.
Upvotes: 2
Views: 2572
Reputation:
The provided answer did not work for me. Instead I needed to ensure that a hubName
was supplied. I did that like so:
In host.json
I added
"extensions": {
"durableTask": {
"hubName": "%DurableTaskHubName%"
}
}
And in local.settings.json
I added
"DurableTaskHubName": "MyFunctionsHub"
to the values
object.
And that solved the issue. You can also directly set the hubName
in the host.json
but this way allows you to configure the hubName
via the environment variables.
Upvotes: 3
Reputation: 2078
Your app running on Azurite and its not run on Older Azure Storage Emulator. its running newer version of Functions runtime. these effect your environment to seeing problems. and you can try with older Azure Storage Emulator.
You have Storage Emulator on your machine checking on this location on your machine ProgramFile(x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe
and try to run this emulator and run before staring debugging and see the issue it solved or not. if emulator already running then azurite won't be started.
Thank @cgillum for providing on solution on this issue.
More information about this issue please visit on these web page VS 2022 Local Debug Durable Functions Issues "Error in LeaseManagerStarter task. Exception: Microsoft.WindowsAzure.Storage.StorageException
Upvotes: 0