Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureBlob Cannot retry after redirect #758

Open
Ismael opened this issue Jan 8, 2025 · 2 comments
Open

AzureBlob Cannot retry after redirect #758

Ismael opened this issue Jan 8, 2025 · 2 comments
Labels

Comments

@Ismael
Copy link

Ismael commented Jan 8, 2025

I'm getting this error message (file details redacted)

[s3proxy] E 01-07 15:19:44.707 S3Proxy-Jetty-3872 o.j.h.h.RedirectionRetryHandler:88 |::] Cannot retry after redirect, no host header: [method=org.jclouds.azureblob.AzureBlobClient.public abstract org.jclouds.azureblob.domain.AzureBlob org.jclouds.azureblob.AzureBlobClient.getBlob(java.lang.String,java.lang.String,org.jclouds.http.options.GetOptions[])[REDACTED, [Lorg.jclouds.http.options.GetOptions;@10087319], request=GET https://REDACTED.blob.core.windows.net/REDACTED HTTP/1.1]

If I manually retry it works ok. I don't see a pattern on when or why it fails. Sorry I can't be more helpful. Any advice on how to get you more relevant information on the failure?

@gaul
Copy link
Owner

gaul commented Jan 8, 2025

Ideally S3Proxy should not retry any operation and some of the are not retriable, e.g., get and put blob, due to streaming payloads. S3Proxy already propagate errors back to the S3 client so it can retry. If only the client retries this avoids weird nested retry loops. I notice that the underlying option jclouds.max-retries is not set so I propose to set this to 1. You can test this yourself by adding it to s3proxy.conf.

Actually the new azureblob-sdk already disables retries:

var retryOptions = new RequestRetryOptions(

I wonder if you could test this as well? This will be the recommended storage backend in the future although it lacks MPU support due to current SDK limitations.

@gaul gaul added the azure label Jan 9, 2025
@Ismael
Copy link
Author

Ismael commented Feb 7, 2025

Using azureblob-sdk, posting a large file (640Mb) I get this runtime error. I built this from master.

s3proxy        at com.azure.storage.common.StorageOutputStream.checkStreamState(StorageOutputStream.java:92)
s3proxy        at com.azure.storage.blob.specialized.BlobOutputStream$BlockBlobOutputStream.writeInternal(BlobOutputStream.java:291)
s3proxy        at com.azure.storage.common.StorageOutputStream.write(StorageOutputStream.java:129)
s3proxy        at java.base/java.io.InputStream.transferTo(Unknown Source)
s3proxy        at org.gaul.s3proxy.azureblob.AzureBlobStore.putBlob(AzureBlobStore.java:400)
s3proxy        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
s3proxy        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
s3proxy        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
s3proxy        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
s3proxy        at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
s3proxy        at jdk.proxy2/jdk.proxy2.$Proxy68.putBlob(Unknown Source)
s3proxy        at org.gaul.s3proxy.S3ProxyHandler.handlePutBlob(S3ProxyHandler.java:2027)
s3proxy        at org.gaul.s3proxy.S3ProxyHandler.doHandle(S3ProxyHandler.java:765)
s3proxy        at org.gaul.s3proxy.S3ProxyHandlerJetty.handle(S3ProxyHandlerJetty.java:80)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.Server.handle(Server.java:563)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:193)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
s3proxy        at org.gaul.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
s3proxy        at java.base/java.lang.Thread.run(Unknown Source)
s3proxy        Suppressed: java.lang.RuntimeException: java.lang.IllegalStateException: Faulted stream due to underlying sink write failure
s3proxy                at com.azure.storage.common.StorageOutputStream.checkStreamState(StorageOutputStream.java:92)
s3proxy                at com.azure.storage.blob.specialized.BlobOutputStream.close(BlobOutputStream.java:132)
s3proxy                at org.gaul.s3proxy.azureblob.AzureBlobStore.putBlob(AzureBlobStore.java:398)
s3proxy                ... 26 common frames omitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants