Microsoft.Azure.Cosmos.Table.StorageException

Janusz Jasinski 41 Reputation points
2021-07-27T09:47:03.963+00:00

Hi All,

I'm getting this exception while running Azure function 2 in C#.
Function itself does not use Table Storage, so I'm pretty sure its some underlying Azure issue:

Error writing logs to table storage: Microsoft.Azure.Cosmos.Table.StorageException: Element 0 in the batch returned an unexpected response code. at Microsoft.Azure.Cosmos.Table.RestExecutor.TableCommand.Executor.ExecuteAsyncT at Microsoft.Azure.WebJobs.Logging.Utility.SafeExecuteAsync(CloudTable table, TableBatchOperation batch) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Logging\Internal\Utility.cs:line 178 at Microsoft.Azure.WebJobs.Logging.Utility.WriteBatchAsyncT in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Logging\Internal\Utility.cs:line 268 at Microsoft.Azure.WebJobs.Logging.LogWriter.FlushTimelineAggregateAsync(Boolean always) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Logging\Internal\LogWriter.cs:line 265 at Microsoft.Azure.WebJobs.Logging.LogWriter.FlushCoreAsync() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Logging\Internal\LogWriter.cs:line 316 Request Information RequestID:d0dd562f-f002-0062-7ec3-82aed8000000 RequestDate:Tue, 27 Jul 2021 08:42:32 GMT StatusMessage:0:This request is not authorized to perform this operation. ErrorCode: ErrorMessage:0:This request is not authorized to perform this operation. RequestId:d0dd562f-f002-0062-7ec3-82aed8000000 Time:2021-07-27T08:42:33.1540642Z

This popups on the end of the function logs.

KR

Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
156 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,212 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,516 Reputation points Microsoft Employee
    2021-07-28T06:35:02.767+00:00

    @Janusz Jasinski Internally Functions uses Table Storage for logging if the AzureWebJobsDashboard app setting is set. It's recommended to use Application Insights for logging in production scenarios, so you can safely remove this and set the APPINSIGHTS_INSTRUMENTATIONKEY app setting instead.

    If you plan to use Table Storage logs for other reasons, ensure that the connection string is correct and the firewall settings of your storage account.

    0 comments No comments

0 additional answers

Sort by: Most helpful