Azurite: Generating blob SAS tokens is failing with the NuGet package of version 12.20.0 and Azurite 3.30.0

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the Azurite was used?

3.30.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What’s the Node.js version?

Presumably the latest LTS version

What problem was encountered?

Steps to reproduce the issue?

We are including azurite in our docker image by the following script to use the docker image as a build agent where we run our integration tests:

RUN sudo apt-get -y install nodejs
RUN sudo apt-get install -y nodejs npm
RUN sudo npm install -g azurite
RUN sudo npm fund

To launch the included azurite instance, we issue the following command in our build pipeline’s YAML file:

‘sudo azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 -s -l /usr/local/lib/node_modules/azurite -d /usr/local/lib/node_modules/azurite/debug.log &’

We built the image and deployed to our k8s cluster a few months ago with the azurite version 3.29.0 and the integration tests have been working fine since then. We recently upgraded the Azure.Storage.Blobs ver 12.19.1 and Azure.Storage.Queues ver 12.17.1 NuGet packages that our integration tests use to versions 12.20.0 and 12.18.0, but the tests started failing after producing the following error messages despite we upgraded the azurite’s instance to version 3.30.0:

2024-06-03T12:25:17.5563021Z Critical : ContainerWritingSASGenerator [0] System.AggregateException: Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. (Connection refused (127.0.0.1:10000)) (Connection refused (127.0.0.1:10000)) (Connection refused (127.0.0.1:10000)) (Connection refused (127.0.0.1:10000)) (Connection refused (127.0.0.1:10000)) (Connection refused (127.0.0.1:10000)) 2024-06-03T12:25:17.5564076Z —> Azure.RequestFailedException: Connection refused (127.0.0.1:10000) 2024-06-03T12:25:17.5564813Z —> System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:10000) 2024-06-03T12:25:17.5565576Z —> System.Net.Sockets.SocketException (111): Connection refused 2024-06-03T12:25:17.5566046Z at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) 2024-06-03T12:25:17.5566595Z at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) 2024-06-03T12:25:17.5567155Z at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5567782Z — End of inner exception stack trace — 2024-06-03T12:25:17.5568655Z at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5569359Z at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5569893Z at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5570383Z at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) 2024-06-03T12:25:17.5570889Z at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) 2024-06-03T12:25:17.5571570Z at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) 2024-06-03T12:25:17.5572320Z at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) 2024-06-03T12:25:17.5572885Z at Azure.Core.Pipeline.HttpClientTransport.ProcessSyncOrAsync(HttpMessage message, Boolean async) 2024-06-03T12:25:17.5573574Z --- End of inner exception stack trace --- 2024-06-03T12:25:17.5574081Z at Azure.Core.Pipeline.HttpClientTransport.ProcessSyncOrAsync(HttpMessage message, Boolean async) 2024-06-03T12:25:17.5574560Z at Azure.Core.Pipeline.HttpPipelineTransportPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline) 2024-06-03T12:25:17.5575045Z at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async) 2024-06-03T12:25:17.5575678Z at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.InnerProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline) 2024-06-03T12:25:17.5576296Z at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async) 2024-06-03T12:25:17.5576785Z at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async) 2024-06-03T12:25:17.5577262Z — End of inner exception stack trace — 2024-06-03T12:25:17.5577833Z at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline, Boolean async) 2024-06-03T12:25:17.5578349Z at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.InnerProcessAsync(HttpMessage message, ReadOnlyMemory1 pipeline) 2024-06-03T12:25:17.5579070Z at Azure.Storage.Blobs.ContainerRestClient.GetPropertiesAsync(Nullable`1 timeout, String leaseId, CancellationToken cancellationToken) 2024-06-03T12:25:17.5579750Z at Azure.Storage.Blobs.BlobContainerClient.GetPropertiesInternal(BlobRequestConditions conditions, Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5580282Z at Azure.Storage.Blobs.BlobContainerClient.ExistsInternal(Boolean async, CancellationToken cancellationToken) 2024-06-03T12:25:17.5580745Z at Azure.Storage.Blobs.BlobContainerClient.ExistsAsync(CancellationToken cancellationToken)

Although, this failure does not happen on the development laptop where azurite ver 3.30.0 and same latest nuget packages are present.

Have you found a mitigation/solution?

No

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

@bluewe Apparently we needed to get the docker file download and include the node’s ver 20.x explicitly. Ver 20.x is not by default selected otherwise.

@Arash-Sabet

Thanks for the sharing! Will look into this when finish the higher priority work in hand and update later.