使用Azure App Service Logging时是否需要blob StorageExceptions?

时间:2015-03-26 23:21:41

标签: azure azure-storage-blobs azure-web-sites

每隔30或40分钟,当我们从Azure网站流式传输应用程序日志时,我看到以下异常对不起.... Azure Web App: - )

Application: Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
Application:    at System.Net.HttpWebRequest.GetResponse()
Application:    at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
Application:    --- End of inner exception stack trace ---
Application:    at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
Application:    at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockList(IEnumerable`1 blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Application:    at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.AppendStreamToBlob(Stream stream)
Application:    at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.ConsumeBuffer()
Application: Request Information
Application: RequestDate:Thu, 26 Mar 2015 22:58:05 GMT
Application: StatusMessage:The specified block list is invalid.
Application: ErrorCode:InvalidBlockList

在Azure应用服务上启用诊断日志记录时,是否会出现这种情况?是否只是忽略了第一次机会例外?

1 个答案:

答案 0 :(得分:2)

异常堆栈跟踪不包括您的Service Bus Queue调用,因此不应该由您调用SendAsync引起。 AzureBlobTraceListener是.NET trace listener,它将所有跟踪和调试输出上载到Azure Blob服务。看起来它在上传这些blob时遇到了问题。

我们确认这是AzureBlobTraceListener中的一个错误,现在已修复。感谢您举报此事,对于给您带来的不便,我们深表歉意。

但是,如果您的应用服务日志记录不应该首先启用,请参阅Enable diagnostics logging for web apps in Azure App Service以获取更多信息。