Sam Vanhoutte
Sam Vanhoutte

Reputation: 3461

DurableTaskStorageException when debugging Durable Functions: Make sure the value of Authorization header is formed correctly including the signature

I want to test out some changes against data of a Durable Functions project. Therefore, I have copied data from my production environment into a different (newly created) storage account. I kept the TaskHubName the same as for my production environment.

However, after changing the AzureWebJobsStorage connection string to the new storage account, I see several DurableTaskStorageExceptions in the output.

This is the full exception message:

DurableTask.AzureStorage.Storage.DurableTaskStorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

I have copied the following items to my new storage account:

Upon startup, the following get automatically created, so my actual Storage Connection String should be correct:

Any idea what could be causing this?

The full Stack Trace can be seen here:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: REDACTED ---> DurableTask.AzureStorage.Storage.DurableTaskStorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. ---> Microsoft.WindowsAzure.Storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand_1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token) at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.DownloadRangeToStreamAsync(Stream target, Nullable_1 offset, Nullable_1 length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress_1 progressHandler, CancellationToken cancellationToken) at DurableTask.AzureStorage.Storage.AzureStorageClient.WrapFunctionWithReturnType(Func_3 storageRequest, OperationContext context, CancellationToken cancellationToken) in //src/DurableTask.AzureStorage/Storage/AzureStorageClient.cs:line 130 at DurableTask.AzureStorage.TimeoutHandler.ExecuteWithTimeout[T](String operationName, String account, AzureStorageOrchestrationServiceSettings settings, Func_3 operation, AzureStorageOrchestrationServiceStats stats, String clientRequestId) in //src/DurableTask.AzureStorage/TimeoutHandler.cs:line 52 at DurableTask.AzureStorage.Storage.AzureStorageClient.MakeStorageRequest[T](Func_3 storageRequest, String operationName, String clientRequestId) in /_/src/DurableTask.AzureStorage/Storage/AzureStorageClient.cs:line 111

Upvotes: 1

Views: 4685

Answers (1)

kavya Saraboju
kavya Saraboju

Reputation: 10869

Please check if below are the causes:

  1. This error occurs mostly due to incorrect incorrect account name or account key (may be due to special characters being present or due to expiry)
  2. Another issue maybe the Copmuters /PC’S time (difference in time zone ).
  3. Please also try to connection string by going to Settings > Access keys in azure portal.
  4. Try to regenerate the SAS token if used through azure storage explorer or through portal (this time try with different key (say key2)).

Also please check the other Possibilities like

  1. Check if connection string has any special characters (example:Try to escape % by placing %%). check that your AzureWebJobsStorage string is up to date.\

  2. It can be due to azure sdks versions incompatibility

References:

  1. microsoft.com reference
  2. azurestorage blob server failed to authenticate the request-SO reference
  3. Upload File to Azure Blob Storage with PowerShell - Microsoft Q&A

Upvotes: 0

Related Questions