I have an Azure Function project containing both normal and timer functions. The timer function stopped working all of a sudden with error – The listener for function 'Function1' was unable to start. Azure.Storage.Blobs: Service request failed.
.
As part of troubleshooting, I created a sample Azure Function project, which also has same problem. Below listed is the complete log from console.
Azure Functions Core Tools
Core Tools Version: 4.0.4895 Commit hash: N/A (64-bit)
Function Runtime Version: 4.13.0.19486
[2022-12-05T05:39:46.886Z] Found C:Visual Studio 2022ProjectsFunctionApp2FunctionApp2FunctionApp2.csproj. Using for user secrets file configuration.
Functions:
Function1: timerTrigger
For detailed output, run func with --verbose flag.
[2022-12-05T05:39:49.681Z] The listener for function 'Function1' was unable to start.
[2022-12-05T05:39:49.682Z] The listener for function 'Function1' was unable to start. Azure.Storage.Blobs: Service request failed.
[2022-12-05T05:39:49.683Z] Status: 400 (The value for one of the HTTP headers is not in the correct format.)
[2022-12-05T05:39:49.683Z] ErrorCode: InvalidHeaderValue
[2022-12-05T05:39:49.684Z]
[2022-12-05T05:39:49.684Z] Headers:
[2022-12-05T05:39:49.685Z] Server: Azurite-Blob/3.14.1
[2022-12-05T05:39:49.685Z] x-ms-error-code: InvalidHeaderValue
[2022-12-05T05:39:49.686Z] x-ms-request-id: 9d066414-f486-4f91-8b1a-a1f7b5ee9641
[2022-12-05T05:39:49.686Z] Date: Mon, 05 Dec 2022 05:39:49 GMT
[2022-12-05T05:39:49.687Z] Connection: keep-alive
[2022-12-05T05:39:49.687Z] Keep-Alive: REDACTED
[2022-12-05T05:39:49.688Z] Content-Length: 0
[2022-12-05T05:39:49.689Z] .
I checked the status of AzureStorageEmulator
in location C:Program Files (x86)Microsoft SDKsAzureStorage Emulator
. The status is IsRunning=False
(screenshot added below):
I tried init
and start
on AzureStorageEmulator and got below error:
Below is how the settings looks like
I read through similar issues but none of the solution resolved the issue. Did anyone faced similar issues? Can anyone please suggest what could be the potential issue here?
Thanks in advance.
2
Answers
In the first screenshot, it can be seen that Storage Emulator Objects running on port number
10000
.When it is using by some other process, then either we need to start the Storage Emulator in new port number or kill the existing process running with that port number.
You can find which process is using the port number
10000
using the cmdlet in Command prompt:In the Same Command prompt, after killing the process or if the process port 10000 is in idle state, run this cmdlet:
netsh http add iplisten 127.0.0.1
Now, Open the Azure Storage Emulator Command Prompt in the system and then run the below cmdlets in the same order:
(OR)
If the above cmdlet is running indefinitely, then stop using
Ctrl + C
and then run the below cmdlet to start the storage emulatorRefer to this SO Thread for similar issue resolutions regarding the Azure Storage Emulator Start Issues for running the applications.
Use MS Azure Storage Explorer, go to Azure Emulator/Blob Containers and delete all from there.
Rebuild and run your project in VS