IoTEdge Blob Storage Local - Can create container, But cannot upload the files

Ramon Andrade 11 Reputation points
2021-12-02T22:59:51.843+00:00

I'm trying to upload file to a local azure-blob-storage container following the sample at https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet?view=iotedge-2020-11 but is throwing an error on upload the file.

I can connect to the local blob storage, create the container but on upload the file it throws an error:

Using Azure Storage Explorer I had the same problem (I can create a container but cannot upload any file to the container).

I'm using docker-compose to start azure-blob-storage docker image and using C# code to upload the file to the blob storage.

Host machine: Windows 10 Enterprise
azure-blob-storage image: Linux

docker-compose file:

version: '3.4'  
  
services:  
    azure-blob-storage:  
        image: "mcr.microsoft.com/azure-blob-storage:latest"  
        hostname: azure-blob-storage  
        environment:  
            LOCAL_STORAGE_ACCOUNT_NAME: sample  
            LOCAL_STORAGE_ACCOUNT_KEY: "zRSmKbeUMb1NUkFjoGC9RA=="       
        volumes:  
            - "../azure-blob-storage/data:/blobroot"  
        ports:  
            - "11002:11002"  
  

C# method to upload:

private async void UploadNewFile()  
{  
	string connectionString = "DefaultEndpointsProtocol=http;BlobEndpoint=http://localhost:11002/sample;AccountName=sample;AccountKey=zRSmKbeUMb1NUkFjoGC9RA==;";  
  
	// Create a BlobServiceClient object which will be used to create a container client  
	BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString);  
  
	//Create a unique name for the container  
	string containerName = "container";  
  
	// Create the container and return a container client object  
	BlobContainerClient containerClient = await blobServiceClient.CreateBlobContainerAsync(containerName);  
	// Create a local file in the ./data/ directory for uploading and downloading  
	string localPath = "D:\\sample\\azure-blob-storage";  
	string fileName = "quickstart" + Guid.NewGuid().ToString() + ".txt";  
	string localFilePath = Path.Combine(localPath, fileName);  
  
	// Write text to the file  
	await System.IO.File.WriteAllTextAsync(localFilePath, "Hello, World!");  
  
	// Get a reference to a blob  
	BlobClient blobClient = containerClient.GetBlobClient(fileName);  
  
	Console.WriteLine("Uploading to Blob storage as blob:\n\t {0}\n", blobClient.Uri);  
  
	// Upload data from the local file  
	await blobClient.UploadAsync(localFilePath, true);  
}  

Error:

[2021-12-02 21:59:02.623] [info    ] [tid 33] WossProvider : Setting PutBlob timeout to '{0}'(initial timeout was '{1}')., p0="119.9721728", p1="119.9721728"  
[2021-12-02 21:59:02.628] [info    ] [tid 33] WossProvider : PutBlobAsync >> Account = {0}, Container = {1}, Blob = {2}, Timeout = {3}, ContentLength = {4}, OverwriteOption = {5}, Condition = {6}., p0="sample", p1="container", p2="quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt", p3="00:01:59.9721728", p4="13", p5="CreateNewOrUpdateExisting", p6="[includeDisabledContainers = False, includeExpiredBlobs = False, ifModifiedSinceTime = <null>, ifNotModifiedSinceTime = <null>, leaseId = <null>, isIncludingUncommittedBlobs = True, isFetchingMetadata = False, isIncludingSnapshots = False, isIncludingPageBlobs = False, isIncludingAppendBlobs = False, isDeletingOnlySnapshots = False, ifLastModificationTimeMatch = <null>, ifLastModificationTimeMismatch = <null>, isRequiringNoSnapshots = False, isSkippingLastModificationTimeUpdate = False, sequenceNumberOperator = <null>, sequenceNumber = <null>, requiredBlobType = None, isMultipleConditionalHeaderEnabled = False, IsOperationOnAppendBlobsAllowed = True, IsRequiringLeaseIfNotModifiedSince = <null>, isDiskMountStateConditionRequired = False, ExcludeSoftDeletedBlobs = True, ExcludeAutomaticSnapshots = True, IncludeBlobVersionId = False, EnsureBlobIsAlreadySoftdeleted = False, isOperationAllowedOnArchivedBlobs = False, skipLeaseCheck = False, internalArchiveBlobLMT = <null>, internalArchiveBlobGenerationId = <null>, internalArchvieRequestId = <null>, includeSoftDeletedBlobsOnly = False, enforceWormPolicy = True, updateSequenceNumber = False, blobDeletePermissionLevel = RootBlobAndUserSnapshotOnly, ActiveNamespaceTransactionId = , excludeDFSCapacity = False, excludeNfsV3Capacity = False, RequireFileEntity = False, BlobPropertiesOwner = None, GetSoftDeleteInfoOnNotFound = False, ExcludeExpiredSoftDeletedBlob = False, EnforcedAccessTier = <null>, IsOperationBlockedOnGizafiedBlobs = True, LastAccessTimeTrackCondition = None, LastTrackingTime = <null>, LastAutoUptierTime = <null>, IncludeGeoReplicationLockedRows = False, DisableWriteOnSymLink = False]"  
[2021-12-02 21:59:02.629] [info    ] [tid 15] [ContainerInterface.cc:62] [GetBlobContainerProperties] Get container properties. Name:container  
[2021-12-02 21:59:02.658] [info    ] [tid 15] [BlobInterface.cc:66] [PutBlob] PutBlob received. Container:container Blob:quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt BlobType:block_blob ContentLength:13 Overwrite:create_new_or_update_existing SvcMetadataSize:36 AppMetadataSize:0 DataSize:13  
[2021-12-02 21:59:02.658] [error   ] [tid 15] [MetaStore.cc:1530] [GetBlobRecord] Blob not found. ContainerName:container BlobName:quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt  
[2021-12-02 21:59:02.658] [error   ] [tid 15] [MetaStore.cc:1530] [GetBlobRecord] Blob not found. ContainerName:container BlobName:quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt  
[2021-12-02 21:59:02.659] [info    ] [tid 15] [DataStoreCommon.cc:199] [GetBlobFilePath] Insert BlobFilePath record. key:container.quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt value:container/quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt  
[2021-12-02 21:59:02.664] [error   ] [tid 15] [DataStore.cc:389] [GetFileOffset] fallocate failed with error: Not supported  
[2021-12-02 21:59:02.664] [info    ] [tid 15] [DataStore.cc:404] [GetFileOffset] AllocateRange completed. next ChunkId:0  
[2021-12-02 21:59:02.665] [error   ] [tid 15] [BlobInterface.cc:224] [PutBlob] PutBlob failed. Container:container Blob:quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt Status:1359  
[2021-12-02 21:59:02.667] [error   ] [tid 15] WossProvider : PutBlobAsync failed with error {0}, p0="1359"  
[2021-12-02 21:59:02.672] [error   ] [tid 35] WossProvider : Exception in EndPutBlob {0}, p0="Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WStoreException: PutBlobAsync failed  
 ---> ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.  
   at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass9_0.<PutBlobAsync>b__0()  
   at System.Threading.Tasks.Task`1.InnerInvoke()  
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location where exception was thrown ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobSingleChunk()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobAsync()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   at Microsoft.AzureStack.Services.Storage.Util.Await(Task t)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)"  
[2021-12-02 21:59:02.682] [info    ] [tid 35] Info: Processing exception: {0}, p0="Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WStoreException: PutBlobAsync failed  
 ---> ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.  
   at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass9_0.<PutBlobAsync>b__0()  
   at System.Threading.Tasks.Task`1.InnerInvoke()  
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location where exception was thrown ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobSingleChunk()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobAsync()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   at Microsoft.AzureStack.Services.Storage.Util.Await(Task t)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.ExceptionManager.ReThrowIfWStoreException(Exception e)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.PutBlobImpl(IAccountIdentifier identifier, String account, IStorageAccount storageAccount, String container, String blob, Stream inputStream, Int64 contentLength, IPutBlobProperties putBlobProperties, Boolean supportCrc64, Boolean calculateCrc64, Boolean storeCrc64, Boolean verifyCrc64, Boolean calculateMd5, Boolean storeMd5, Boolean verifyMd5, Boolean generationIdEnabled, Boolean isLargeBlockBlobRequest, Boolean is8TBPageBlobAllowed, BlobObjectCondition condition, BlobIdentifier blobIdentifier, OverwriteOption overwriteOption, TimeSpan timeout, RequestContext requestContext, AccessTier accessTier, String blobSasUrl, AsyncIteratorContext`1 context)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.Protocols.Rest.HttpRestProcessor.PutBlobImpl(AsyncIteratorContext`1 async)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.EndPerformOperation(IAsyncResult ar)  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.ProcessImpl(AsyncIteratorContext`1 async)+MoveNext()"  
[2021-12-02 21:59:02.699] [error   ] [tid 35] UnexpectedXStoreError: An unexpected XStore error was encountered: {0}, p0="Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WStoreException: PutBlobAsync failed  
 ---> ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.  
   at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass9_0.<PutBlobAsync>b__0()  
   at System.Threading.Tasks.Task`1.InnerInvoke()  
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location where exception was thrown ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobSingleChunk()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobAsync()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   at Microsoft.AzureStack.Services.Storage.Util.Await(Task t)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.ExceptionManager.ReThrowIfWStoreException(Exception e)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.PutBlobImpl(IAccountIdentifier identifier, String account, IStorageAccount storageAccount, String container, String blob, Stream inputStream, Int64 contentLength, IPutBlobProperties putBlobProperties, Boolean supportCrc64, Boolean calculateCrc64, Boolean storeCrc64, Boolean verifyCrc64, Boolean calculateMd5, Boolean storeMd5, Boolean verifyMd5, Boolean generationIdEnabled, Boolean isLargeBlockBlobRequest, Boolean is8TBPageBlobAllowed, BlobObjectCondition condition, BlobIdentifier blobIdentifier, OverwriteOption overwriteOption, TimeSpan timeout, RequestContext requestContext, AccessTier accessTier, String blobSasUrl, AsyncIteratorContext`1 context)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.Protocols.Rest.HttpRestProcessor.PutBlobImpl(AsyncIteratorContext`1 async)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.EndPerformOperation(IAsyncResult ar)  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.ProcessImpl(AsyncIteratorContext`1 async)+MoveNext()"  
[2021-12-02 21:59:02.716] [info    ] [tid 35] Info: Setting status description as "{0}", p0="Server encountered an internal error. Please try again after some time."  
[2021-12-02 21:59:02.762] [info    ] [tid 35] Perf: PerfCounters: Account={0} Operation={1} on Container={2} with Status={3} RequestHeaderSize={4} RequestSize={5} ResponseHeaderSize={6} ResponseSize={7} ErrorResponseByte={8} TimeInMs={9} ProcessingTimeInMs={10} UserTimeoutInMs={11} OperationTimeoutInMs={12} MaxAllowedTimeoutInMs={13} SlaUsedInMs={14} ReadLatencyInMs={15} WriteLatencyInMs={16} ClientIP={17} UserAgent='{18}' RequestVersion='{19}' ProcessorVersionUsed='{20}' RequestUrl='{21}' ClientRequestId='{22}' MeasurementStatus={23} HttpStatusCode={24} TotalFeTimeInMs={25} TotalTableServerTimeInMs={26} TotalTableServerRoundTripCount={27} TotalPartitionWaitTimeInMs={28} TotalXStreamTimeInMs={29} TotalXStreamRoundTripCount={30} SmbOpLockBreakLatency={31} LastTableServerInstanceName={32} LastTableServerErrorCode={33} TotalAccountCacheWaitTimeInMs={34} TotalContainerCacheWaitTimeInMs={35} InternalStatus={36} RequestContentType='{37}' ResponseContentType='{38}' PartitionKey='{39}' ItemsReturned='{40}' BatchOperationCount='{41}' LastXStreamErrorCode={42} AuthenticationType='{43}' AccountConcurrentReq='{44}' OverallConcurrentReq='{45}' Range='{46}' EntityType='{47}' {48} LastTSPartition={49} TotalXCacheTimeInMs={50} TotalXCacheRoundTripCount={51} TotalTableServerOnlyTimeInMicroSeconds={52} TotalAuthTimeInMs={53} AuthenticationTimeInMs={54} AuthorizationTimeInMs={55} GetAuthenticationDataTimeInMs={56} GetAuthorizationDataTimeInMs={57} VnetPolicyCheckTimeInMs={58} PerfFeatureFlags={59}, p0="sample", p1="PutBlob", p2="container", p3="InternalError", p4="583", p5="13", p6="222", p7="5271", p8="5271", p9="175.9193", p10="172.7702", p11="922337203685477", p12="120000", p13="120000", p14="0", p15="0.995", p16="2.1541", p17="192.168.16.1:55518", p18="azsdk-net-Storage.Blobs/12.10.0 (.NET 5.0.6; Microsoft Windows 10.0.18363)", p19="2020-10-02", p20="2020-10-02", p21="http://localhost:11002/sample/container/quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt", p22="16e89412-c9a8-424f-95c8-d6abe2a5cfc1", p23="UnknownFailure", p24="500", p25="172.77", p26="0", p27="0", p28="0", p29="0", p30="0", p31="0", p32="", p33="0", p34="0", p35="0", p36="ServerOtherError", p37="application/octet-stream", p38="application/xml", p39="quickstartf02feeed-569c-4cc2-856f-0cbe8b464ee9.txt", p40="0", p41="0", p42="0", p43="NA", p44="", p45="1", p46="", p47="BlockBlob", p48="", p49="", p50="0", p51="0", p52="0", p53="0.405", p54="0.37", p55="0.035", p56="0", p57="0", p58="0", p59="null"  
[2021-12-02 21:59:02.766] [info    ] [tid 35] Info: Processing exception: {0}, p0="Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WStoreException: PutBlobAsync failed  
 ---> ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.  
   at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass9_0.<PutBlobAsync>b__0()  
   at System.Threading.Tasks.Task`1.InnerInvoke()  
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location where exception was thrown ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobSingleChunk()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobAsync()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   at Microsoft.AzureStack.Services.Storage.Util.Await(Task t)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.ExceptionManager.ReThrowIfWStoreException(Exception e)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.PutBlobImpl(IAccountIdentifier identifier, String account, IStorageAccount storageAccount, String container, String blob, Stream inputStream, Int64 contentLength, IPutBlobProperties putBlobProperties, Boolean supportCrc64, Boolean calculateCrc64, Boolean storeCrc64, Boolean verifyCrc64, Boolean calculateMd5, Boolean storeMd5, Boolean verifyMd5, Boolean generationIdEnabled, Boolean isLargeBlockBlobRequest, Boolean is8TBPageBlobAllowed, BlobObjectCondition condition, BlobIdentifier blobIdentifier, OverwriteOption overwriteOption, TimeSpan timeout, RequestContext requestContext, AccessTier accessTier, String blobSasUrl, AsyncIteratorContext`1 context)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.Protocols.Rest.HttpRestProcessor.PutBlobImpl(AsyncIteratorContext`1 async)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.EndPerformOperation(IAsyncResult ar)  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.ProcessImpl(AsyncIteratorContext`1 async)+MoveNext()"  
[2021-12-02 21:59:02.769] [error   ] [tid 35] UnexpectedXStoreError: An unexpected XStore error was encountered: {0}, p0="Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WStoreException: PutBlobAsync failed  
 ---> ErrorCode: 1359, Exception of type 'Microsoft.AzureStack.Services.Storage.Blob.BlobClientException' was thrown.  
   at Microsoft.AzureStack.Services.Storage.Blob.WBlobClient.<>c__DisplayClass9_0.<PutBlobAsync>b__0()  
   at System.Threading.Tasks.Task`1.InnerInvoke()  
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location where exception was thrown ---  
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location where exception was thrown ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobSingleChunk()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBlobStream.PutBlobAsync()  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.PutBlobAsync(String contentType, Int64 contentLength, Nullable`1 maxBlobSize, Byte[] serviceMetadata, Byte[] applicationMetadata, Stream inputStream, CrcReaderStream crcReaderStream, Byte[] contentMD5, Boolean invokeGeneratePutBlobServiceMetadata, GeneratePutBlobServiceMetadata generatePutBlobServiceMetadata, ISequenceNumberUpdate sequenceNumberUpdate, OverwriteOption overwriteOption, IBlobObjectCondition condition)  
   at Microsoft.AzureStack.Services.Storage.Util.Await(Task t)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   --- End of inner exception stack trace ---  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.ExceptionManager.ReThrowIfWStoreException(Exception e)  
   at Microsoft.AzureStack.Services.Storage.FrontEnd.WossProvider.WBaseBlobObject.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.PutBlobImpl(IAccountIdentifier identifier, String account, IStorageAccount storageAccount, String container, String blob, Stream inputStream, Int64 contentLength, IPutBlobProperties putBlobProperties, Boolean supportCrc64, Boolean calculateCrc64, Boolean storeCrc64, Boolean verifyCrc64, Boolean calculateMd5, Boolean storeMd5, Boolean verifyMd5, Boolean generationIdEnabled, Boolean isLargeBlockBlobRequest, Boolean is8TBPageBlobAllowed, BlobObjectCondition condition, BlobIdentifier blobIdentifier, OverwriteOption overwriteOption, TimeSpan timeout, RequestContext requestContext, AccessTier accessTier, String blobSasUrl, AsyncIteratorContext`1 context)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Storage.Service.ServiceManager.RealServiceManager.EndPutBlob(IAsyncResult asyncResult)  
   at Microsoft.Cis.Services.Nephos.Storage.Service.Protocols.Rest.HttpRestProcessor.PutBlobImpl(AsyncIteratorContext`1 async)+MoveNext()  
   at AsyncHelper.AsyncIteratorContextBase.ExecuteIterator(Boolean inBegin)  
   --- End of inner exception stack trace ---  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.EndPerformOperation(IAsyncResult ar)  
   at Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.BasicHttpProcessorWithAuthAndAccountContainer`1.ProcessImpl(AsyncIteratorContext`1 async)+MoveNext()"  
[2021-12-02 21:59:02.783] [info    ] [tid 35] Info: Exception is raised after sending the response. Exception: {0}, Status code: {1}, IsFatal: {2} IsResponseClosed:{3} IsErrorSerialized:{4}, p0="Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Microsoft.Cis.Services.Nephos.Common.Storage.StorageManagerException: No mapping available for WStoreException. HR: 54F (1359), Message: PutBlobAsync failed  
 ---> Mi
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
598 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,761 Reputation points MVP Volunteer Moderator
    2021-12-03T10:10:37.273+00:00

    Hello @Ramon Andrade ,

    You want to code against a local Blob Storage account running in a docker container.

    This blob storage solution is mostly used in combination with Azure IoT Edge.

    I have used it myself and it works as advertised.

    Azure IoT Edge makes it easy to configure the container create options:

    Container Create options:  
    {  
      "Env": [  
        "LOCAL_STORAGE_ACCOUNT_NAME=blobaccount",  
        "LOCAL_STORAGE_ACCOUNT_KEY=[some local key]"  
      ],  
      "HostConfig": {  
        "Binds": [  
          "/srv/containerdata:/blobroot"  
        ],  
        "PortBindings": {  
          "11002/tcp": [  
            {  
              "HostPort": "11002"  
            }  
          ]  
        }  
      }  
    }  
    

    Running it in docker without the Azure IoT Edge runtime could work though.

    Keep in mind a few things:

    • the local storage key must be in a specific format, I added a piece of code in my blog to create one.
    • You need access to the specific port. This internal port must be mapped to be accessible from outside docker. Check the port mapping.
    • The volume must have enough permissions to get access to the local folder. I just raise the permissions on the folder itself for demonstration purposes

    Test the folder access using:

    docker exec -it [blob storagecontainer name] bash  
      
    eg. docker exec -it blob bash  
    

    I recommend testing the blob storage module first using Azure IoT Edge. If this is working, move over to the way you want to use it, without the runtime.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.