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

Uploading data to S3 via Istio using HTTP 2 fails with AWS_ERROR_HTTP_RST_STREAM_RECEIVED #495

Closed
1 task
vm-cyber opened this issue Dec 4, 2024 · 2 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@vm-cyber
Copy link

vm-cyber commented Dec 4, 2024

Describe the bug

Uploading data to S3 via Istio using HTTP 2 fails with AWS_ERROR_HTTP_RST_STREAM_RECEIVED. This works when using HTTP 1.1.

Also I reproduce this problem with your elasticurl sample app.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Data should be successfully uploaded to S3 via Istio using HTTP 2

Current Behavior

Uploading data to S3 via Istio using HTTP 2 fails with AWS_ERROR_HTTP_RST_STREAM_RECEIVED

[ERROR] [2024-12-03T11:11:39Z] [000000016d6f7000] [http-stream] - id=1 connection=0x12f008200 state=HALF_CLOSED_LOCAL: Peer terminated stream with HTTP/2 RST_STREAM frame, error-code=0x1(PROTOCOL_ERROR)
[TRACE] [2024-12-03T11:11:39Z] [000000016d6f7000] [http-stream] - id=1 connection=0x12f008200 state=CLOSED: Received RST_STREAM code=0x1(PROTOCOL_ERROR). State -> CLOSED
[ERROR] [2024-12-03T11:11:39Z] [000000016d6f7000] [http-stream] - id=1 connection=0x12f008200 state=CLOSED: Stream completed with error 2077 (AWS_ERROR_HTTP_RST_STREAM_RECEIVED).

This is elasticurl logs:
elasticurl.txt

Curl successfully uploaded the data with the same parameters. This is curl logs:
curl.txt

Reproduction Steps

elasticurl --verbose TRACE --method PUT --data-file --header "content-encoding:deflate" --header "content-type:text/plain" --header "x-amz-meta-"

Possible Solution

No response

Additional Information/Context

No response

aws-c-http version used

v0.9.0

Compiler and version used

Xcode 16.1

Operating System and version

macOS 15.1.1

@vm-cyber vm-cyber added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 4, 2024
@TingDaoK
Copy link
Contributor

TingDaoK commented Dec 4, 2024

Look through the logs from curl and CRT
Seems like CRT is sending out the first request right after the connection preface (which should be allowed according to the spec.
https://httpwg.org/specs/rfc9113.html#preface).

And looks like the server gets the preface and the first request, but reset the first request right after sending out the settings with protocol error. I cannot really tell what protocol error we have from the log. The possibilities I can think of maybe that the lstio server don't support get the request before the setting was acknowledged?

So, the workflow between CRT client and server is like:

         client                                                           server
         -->settings
         -->window update
         -->first request HEADER
         -->first request DATA
                                                                   <--settings
                                                                   <--window update
         -->settings ack
                                                                   <--settings ack
                                                                   <--RESET STREAM (protocol error)

I don't see why server reset the stream with this flow.

I am not sure how curl does it, the log doesn't seem to have enough info of the details about how the connection established.

I would suggest firstly get some server side log if possible? Otherwise, is there any way for us to reproduce the issue? We cannot reach to your endpoint https://files-nightly.epmdev.be/, so that we cannot really reproduce this issue on our end

@jmklix jmklix added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 5, 2024
@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. and removed response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. labels Dec 13, 2024
@jmklix
Copy link
Member

jmklix commented Dec 16, 2024

Currently S3 doesn't support HTTP2. I'm not sure if this would be changing anytime soon, so best recommendation is to just just http1.1. Please let us know if you have any questions concerning this or any other parts of this sdk

@jmklix jmklix closed this as completed Dec 16, 2024
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. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants