We are currently experiencing an issue with the Azure Blob Storage on IoT Edge module. The module is configured to automatically upload files to an Azure Cloud Storage Account. So far, everything is working as expected.
While uploading a file to the Edge Blob Storage module, we simulate a power outage (by simply pulling the plug). After rebooting the device we see that the file is written into the Edge Blob Storages mount path on the hard drive, but the upload towards the cloud is not being done. We can accept this behavior, since the file might not be properly transmitted to the Edge Blob Storage. The problem that we face is, that no further files, that we upload to the Edge Blob Storage, are being uploaded to the cloud either.
We see the following exception messages in the blob storage module logs:
[2020-11-30 13:59:16.410] [warning ] [tid 871] Microsoft.Azure.Devices.BlobStorage.Tiering.TieringOrchestrator: Too many errors. Scheduling retry is skipped. Next tiering run will pick up the work again depending on the backlog policy.
[2020-11-30 13:59:16.410] [info ] [tid 857] [BlobInterface.cc:1023] [GetBlockList] GetBlockList received. Container:ingress Blob:[REDACTED_FILENAME] BlockListType:1
[2020-11-30 13:59:16.410] [info ] [tid 857] [BlobInterface.cc:1118] [GetBlockList] GetBlockList completed. Container:ingress Blob:[REDACTED_FILENAME] BlockIdSize:39 UncommitedBlocksCount:0 CommitedBlocksCount:171 ContentLength:44665654 ModificationTime:132512154813857402
[2020-11-30 13:59:16.411] [info ] [tid 857] [BlobInterface.cc:1615] [GetBlobTieringMetadata] GetBlobTieringMetadata received. Container:ingress Blob:[REDACTED_FILENAME]
[2020-11-30 13:59:16.412] [info ] [tid 857] [BlobInterface.cc:316] [GetBlobData] GetBlobData received. Container:ingress Blob:[REDACTED_FILENAME] Offset:0 Length:65536 DataBufferOffset:0
[2020-11-30 13:59:16.412] [info ] [tid 857] [BlobInterface.cc:349] [GetBlobData] Blob retrieved. Container:ingress Blob:[REDACTED_FILENAME] CommittedBlockListSize:171
[2020-11-30 13:59:16.412] [info ] [tid 875] [BlobInterface.cc:316] [GetBlobData] GetBlobData received. Container:ingress Blob:[REDACTED_FILENAME] Offset:262144 Length:65536 DataBufferOffset:0
[2020-11-30 13:59:16.412] [error ] [tid 857] [DataStore.cc:197] [ReadChunk] open failed with error:
[2020-11-30 13:59:16.412] [error ] [tid 857] [BlobInterface.cc:415] [GetBlobData] GetBlobData failed. Container:ingress Blob:[REDACTED_FILENAME] Status:1359
[2020-11-30 13:59:16.412] [info ] [tid 875] [BlobInterface.cc:349] [GetBlobData] Blob retrieved. Container:ingress Blob:[REDACTED_FILENAME] CommittedBlockListSize:171
[2020-11-30 13:59:16.412] [error ] [tid 875] [DataStore.cc:197] [ReadChunk] open failed with error:
[2020-11-30 13:59:16.412] [error ] [tid 875] [BlobInterface.cc:415] [GetBlobData] GetBlobData failed. Container:ingress Blob:[REDACTED_FILENAME] Status:1359
[2020-11-30 13:59:16.412] [info ] [tid 874] [BlobInterface.cc:316] [GetBlobData] GetBlobData received. Container:ingress Blob:[REDACTED_FILENAME] Offset:524288 Length:65536 DataBufferOffset:0
[2020-11-30 13:59:16.412] [info ] [tid 874] [BlobInterface.cc:349] [GetBlobData] Blob retrieved. Container:ingress Blob:[REDACTED_FILENAME] CommittedBlockListSize:171
[2020-11-30 13:59:16.412] [error ] [tid 874] [DataStore.cc:197] [ReadChunk] open failed with error:
[2020-11-30 13:59:16.413] [error ] [tid 874] [BlobInterface.cc:415] [GetBlobData] GetBlobData failed. Container:ingress Blob:[REDACTED_FILENAME] Status:1359
[2020-11-30 13:59:16.415] [error ] [tid 857] Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload: PutBlock failed for ingress.[REDACTED_FILENAME].2020-11-30T13:11:21.3857402Z, block id NTA2YWVjOGM5MWI5NDlhNzk4MzUwYzUzMDU5Y2M1OTQtMDAwMDAw
Error: ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.
at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass28_0.<GetBlobDataAsync>b__0() in /app/common/Blob/BlobClient.cs:line 723
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.BlobStorage.Common.BlobReadStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) in /app/common/BlobReadStream.cs:line 88
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsyncHelper(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken token)
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsync(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockAsync(String blockId, Stream blockData, String contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AggregatingProgressIncrementer progressIncrementer, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.PutBlockOnRemote(CloudBlockBlob blob, BlockToPush block) in /app/tiering/BlobUpload.cs:line 540
[2020-11-30 13:59:16.416] [error ] [tid 875] Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload: PutBlock failed for ingress.[REDACTED_FILENAME].2020-11-30T13:11:21.3857402Z, block id NTA2YWVjOGM5MWI5NDlhNzk4MzUwYzUzMDU5Y2M1OTQtMDAwMDAx
Error: ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.
at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass28_0.<GetBlobDataAsync>b__0() in /app/common/Blob/BlobClient.cs:line 723
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.BlobStorage.Common.BlobReadStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) in /app/common/BlobReadStream.cs:line 88
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsyncHelper(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken token)
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsync(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockAsync(String blockId, Stream blockData, String contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AggregatingProgressIncrementer progressIncrementer, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.PutBlockOnRemote(CloudBlockBlob blob, BlockToPush block) in /app/tiering/BlobUpload.cs:line 540
[2020-11-30 13:59:16.416] [error ] [tid 874] Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload: PutBlock failed for ingress.[REDACTED_FILENAME].2020-11-30T13:11:21.3857402Z, block id NTA2YWVjOGM5MWI5NDlhNzk4MzUwYzUzMDU5Y2M1OTQtMDAwMDAy
Error: ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.
at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass28_0.<GetBlobDataAsync>b__0() in /app/common/Blob/BlobClient.cs:line 723
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.BlobStorage.Common.BlobReadStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) in /app/common/BlobReadStream.cs:line 88
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsyncHelper(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken token)
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsync(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockAsync(String blockId, Stream blockData, String contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AggregatingProgressIncrementer progressIncrementer, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.PutBlockOnRemote(CloudBlockBlob blob, BlockToPush block) in /app/tiering/BlobUpload.cs:line 540
[2020-11-30 13:59:16.416] [info ] [tid 874] Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload: Couldn't upload all blocks or commit them for ingress.[REDACTED_FILENAME].2020-11-30T13:11:21.3857402Z Saving partial tiering metadata.
[2020-11-30 13:59:16.416] [info ] [tid 874] [BlobInterface.cc:1582] [SetBlobTieringMetadata] SetBlobTieringMetadata received. Container:ingress Blob:[REDACTED_FILENAME] MetadataSize:256
[2020-11-30 13:59:16.420] [error ] [tid 874] Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload: Upload failed for ingress.[REDACTED_FILENAME].2020-11-30T13:11:21.3857402Z. Error: ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.
at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass28_0.<GetBlobDataAsync>b__0() in /app/common/Blob/BlobClient.cs:line 723
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.BlobStorage.Common.BlobReadStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) in /app/common/BlobReadStream.cs:line 88
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsyncHelper(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken token)
at Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier`1.StartCopyStreamAsync(Nullable`1 copyLength, Nullable`1 maxLength, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.PutBlockAsync(String blockId, Stream blockData, String contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AggregatingProgressIncrementer progressIncrementer, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.PutBlockOnRemote(CloudBlockBlob blob, BlockToPush block) in /app/tiering/BlobUpload.cs:line 540
at Microsoft.Azure.Devices.BlobStorage.Common.AsyncExtensions.<>c__DisplayClass1_1`1.<<ForEachAsync>b__1>d.MoveNext() in /app/common/extensions/AsyncExtensions.cs:line 59
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.PushAndCommitBlocks(CloudBlockBlob blob, IEnumerable`1 blocks) in /app/tiering/BlobUpload.cs:line 439
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.UploadFromBlockList(CloudBlockBlob blob, GetBlockListOperationResult listBlocksResult) in /app/tiering/BlobUpload.cs:line 408
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.UploadBlobMetaAndData(CloudBlob blob, BlobProperties properties, GetBlockListOperationResult listBlocksResult) in /app/tiering/BlobUpload.cs:line 204
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.UploadBlob() in /app/tiering/BlobUpload.cs:line 151
at Microsoft.Azure.Devices.BlobStorage.Tiering.BlobUpload.Run() in /app/tiering/BlobUpload.cs:line 93
Are we doing something wrong? We followed all the guidelines of the following documentation:
https://learn.microsoft.com/en-us/azure/iot-edge/how-to-store-data-blob?view=iotedge-2018-06
https://learn.microsoft.com/en-us/azure/iot-edge/how-to-deploy-blob?view=iotedge-2018-06