Skip to content

S3AsyncClient putObject throwing status code 100 exception #1969

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

Closed
IvoMajic opened this issue Aug 1, 2020 · 4 comments
Closed

S3AsyncClient putObject throwing status code 100 exception #1969

IvoMajic opened this issue Aug 1, 2020 · 4 comments
Labels
bug This issue is a bug. closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@IvoMajic
Copy link

IvoMajic commented Aug 1, 2020

Describe the bug

When doing uploads to S3 as of recently I am getting the following exception:

software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 100, Request ID: null, Extended Request ID: null)

The exception is not very informative as you see. Is there any way to debug this further? All was working correctly up until a few days ago.

Code example:

client.putObject(
PutObjectRequest.builder()
.bucket(properties.s3.bucketName)
.key(formKey(path, imageId))
.acl(if (isPublic) ObjectCannedACL.PUBLIC_READ else null)
.build(),
AsyncRequestBody.fromBytes(imageData)
)

The first response I get is:

HTTP/1.1 100 CONTINUE
Date: Sun, 02 Aug 2020 09:55:11 GMT
Connection: keep-alive

and then

HTTP/1.1 200 OK
Content-Length: 0
ETag: "d1aafcb9635d94434c4370260f956000"
Accept-Ranges: bytes
x-amz-request-id: tx0000000000000021ee840-005f268d7f-7c9455-default
Date: Sun, 02 Aug 2020 09:55:11 GMT
Connection: close that reached at the tail of the pipeline. Please check your pipeline configuration.

I am guessing it happens because the last 200 message is discarded, from the log:

2020-08-02T11:55:11,775 DEBUG [aws-java-sdk-NettyEventLoop-1-4] i.n.c.DefaultChannelPipeline: Discarded inbound message DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)

Seems to me it has something to do with Nettys handing of HTTP 100-Continue

Expected Behavior

The upload finishing successfully.

Your Environment

  • Spring Boot 2.2.7
  • AWS Java SDK version used: 2.13.65
  • JDK version used: 1.8.0_262
  • Operating System and version: Arch Linux
@IvoMajic IvoMajic added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 1, 2020
@debora-ito
Copy link
Member

debora-ito commented Aug 6, 2020

Hi @IvoMajic I was not able to reproduce the issue. My logs show HTTP/1.1 100 Continue

and then

HTTP/1.1 200 OK
x-amz-id-2: xxx
x-amz-request-id: xxx
Date: Thu, 06 Aug 2020 00:01:52 GMT
ETag: "xxx"
2020-08-05 17:01:52 [aws-java-sdk-NettyEventLoop-1-4] DEBUG software.amazon.awssdk.request:84 - Received successful response: 200

I wonder if this is caused by some network configuration. Are you using a proxy?
Can you provide the full stacktrace? Please make sure there is no sensitive data.

All was working correctly up until a few days ago.

Was there some other change that may have triggered the issue?

@debora-ito debora-ito added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 6, 2020
@github-actions
Copy link

It looks like this issue hasn’t been active in longer than a week. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

@github-actions github-actions bot added closing-soon This issue will close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will close in 4 days unless further comments are made. labels Aug 13, 2020
@danielGz
Copy link

danielGz commented Dec 30, 2020

@IvoMajic How did you fix it? I have the same problem, this 100 http status is pretty common, for multi part requests, Please re open the issue:
NettyNioAsyncHttpClient offers very little flexibility, if we could override or add additional channel pipelines in the netty client it could solve the problem. See https://stackoverflow.com/questions/63697436/spring-webflux-and-amazon-sdk-2-x-s3asyncclient-timeout for reference

@IvoMajic
Copy link
Author

IvoMajic commented Dec 30, 2020

I also could not find a fix in the meantime. I agree this should be reopened, since it obviously is not a single instance.

aws-sdk-java-automation added a commit that referenced this issue Mar 23, 2022
…7a42b6d5e

Pull request: release <- staging/88d485f2-098e-4b5a-ac26-d3a7a42b6d5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

3 participants