question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure.Storage.Blobs: Service request failed

See original GitHub issue

Running timer triggers on my local computer suddenly stopped working a few days ago. The full error message is:

The listener for function 'SomeTimerTrigger' was unable to start. Azure.Storage.Blobs: Service request failed
  • I use Visual Studio 2022. Azurite is installed through it (or the Azure workload), I think.
  • I get the same exception for all timer triggers. HTTP triggers work fine.
  • Same code works for other developers, they can run timer triggers locally
  • Project information
    • <TargetFramework>netcoreapp3.1</TargetFramework>
    • <AzureFunctionsVersion>v3</AzureFunctionsVersion>
    • <LangVersion>Latest</LangVersion>

In the Service Dependencies output, we have the following output. I have anonymised some information.

Ensuring Azure Functions Core Tools are up to date. This may take a few minutes...
Project: C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\MICROSOFT\Azure Storage Emulator\azurite.exe --location "C:\Users\USERNAME\AppData\Local\Temp\Azurite" --debug "C:\Users\USERNAME\AppData\Local\Temp\Azurite\debug.log"
Azure Functions Core Tools are up to date.
Project: Azurite Blob service is starting at http://127.0.0.1:10000
Project: Azurite Blob service is successfully listening at http://127.0.0.1:10000
Project: Azurite Queue service is starting at http://127.0.0.1:10001
Project: Azurite Queue service is successfully listening at http://127.0.0.1:10001
Project: Azurite Table service is starting at http://127.0.0.1:10002
Project: Azurite Table service is successfully listening at http://127.0.0.1:10002
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-applease?restype=container HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-applease/testhubname-appleaseinfo HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-leases?restype=container HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-leases?restype=container HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "HEAD /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "HEAD /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "HEAD /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "HEAD /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "GET /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "GET /devstoreaccount1/testhubname-leases/taskhub.json HTTP/1.1" 200 91
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/azure-webjobs-hosts/locks/NODENAME-1124157677/Project.Functions.TimerTrigger.Some.TimerTrigger.Listener?comp=lease HTTP/1.1" 201 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "POST /devstoreaccount1/Tables() HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "POST /devstoreaccount1/Tables() HTTP/1.1" 409 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-workitems HTTP/1.1" 204 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "PUT /devstoreaccount1/testhubname-control-01 HTTP/1.1" 204 -
Project: 127.0.0.1 - - [22/Feb/2022:10:43:02 +0000] "GET /devstoreaccount1/azure-webjobs-hosts/timers/NODENAME-1124157677/Project.Functions.TimerTrigger.Some.TimerTrigger/status HTTP/1.1" 500 129

Details copied from the exception follows. I have removed the computer name.

Category: Host.Startup
Client IP address: 0.0.0.0
Event time: 22/02/2022 10:43:30
Exception type: Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException
FormattedMessage: The listener for function 'SomeTimerTrigger' was unable to start.
HostInstanceId: eb4b02e6-1f82-4f4a-a513-e2d031b58405
LogLevel: Error
Message: The listener for function 'SomeTimerTrigger' was unable to start.
Node name: (redacted by reporter @Sti2nd)
Problem ID: Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException at 
ProcessId: 10344
prop__{OriginalFormat}: The listener for function 'SomeTimerTrigger' was unable to start.
Role instance: (redacted by reporter @Sti2nd)
SDK version: azurefunctionscoretools: 3.0.3904
Severity level: Error

Stack Trace
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException: The listener for function 'SomeTimerTrigger' was unable to start.

Azure.RequestFailedException: Service request failed.
Status: 500 (Internal Server Error)

Headers:
Server: Azurite-Blob/3.14.1
ETag: "0x231D56C1EE9FE60"
x-ms-blob-type: BlockBlob
x-ms-lease-state: available
x-ms-lease-status: unlocked
x-ms-client-request-id: 07ca5baf-0716-466e-ba72-5cda5cd47141
x-ms-request-id: a9c19adf-c282-48b1-8689-9ec2a7add73a
x-ms-version: 2020-10-02
Accept-Ranges: bytes
Date: Tue, 22 Feb 2022 10:43:30 GMT
x-ms-server-encrypted: true
x-ms-blob-content-md5: /i0DJYHXwM7brV1Yy3Au2w==
Connection: keep-alive
Keep-Alive: REDACTED
Last-Modified: Mon, 24 Jan 2022 14:37:16 GMT
Content-Length: 129
Content-Type: application/octet-stream
Content-MD5: /i0DJYHXwM7brV1Yy3Au2w==

    at  Azure.Storage.Blobs.BlobRestClient+<DownloadAsync>d__6.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<StartDownloadAsync>d__57.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<DownloadStreamingInternal>d__56.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<DownloadInternal>d__53.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<DownloadAsync>d__52.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<DownloadAsync>d__50.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult
    at  Azure.Storage.Blobs.Specialized.BlobBaseClient+<DownloadAsync>d__48.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.TaskAwaiter`1.GetResult
    at  Microsoft.Azure.WebJobs.Extensions.Timers.AzureStorageScheduleMonitor+<GetStatusAsync>d__11.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  System.Runtime.CompilerServices.TaskAwaiter`1.GetResult
    at  Microsoft.Azure.WebJobs.Extensions.Timers.Listeners.TimerListener+<StartAsync>d__31.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener+<StartAsync>d__13.MoveNext
    at  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
    at  System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
    at  System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
    at  Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener+<StartAsync>d__13.MoveNext

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

32reactions
SignorLuigicommented, May 24, 2022

Ok I found a workaround for those who didn’t make it work with the previews one. Go to Azure Explorer Storage, search for the (Emulator - Default Ports) (Key) and clean up the containers, and that’s all. I worked good for me.

image

9reactions
JimiSwedencommented, Jan 13, 2023

Ok I found a workaround for those who didn’t get it working with the preview. Go to Azure Explorer Storage, search for the (Emulator - Default Ports) (Key) and clean up the containers, and that’s all. It worked good for me.

image

to clarify:

  1. download “Azure Storage Explorer” https://azure.microsoft.com/en-us/products/storage/storage-explorer/#overview
  2. Delete what is in “azure-webjobs-hosts”
image
Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions: Blob Storage emulator stopped working ...
I was able to solve this issue by using Azure Storage Explorer and deleting the related blob folder under azure-webjobs-hosts in the local ......
Read more >
Azure Request failed exception for my Azure Function App
The listener for function 'Functions.TimerTrigger2' was unable to start. Service request failed. Status: 403 (The specified account is ...
Read more >
Azure Blob Storage error codes
Error code HTTP status code User message BlobAlreadyExists Conflict (409) The specified blob already exists. BlobNotFound Not Found (404) The specified blob does not exist. ContainerAlreadyExists...
Read more >
Azure Function App - Azure.Storage.Blobs: This request is ...
In the Azure portal, when I go in to the overview of the function app I see a big red error with a...
Read more >
AzureFunction returns 403 when deploying to Azure. ...
I have an AzureFunction that accesses a blob-storage. ... Storage.Blobs: Service request failed. ... Storage.Blobs Service (or was there? ).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found