-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error #62453
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
Comments
Related issue: #62450 |
I cannot change the body Because it requires |
You can avoid this by assigning a valid function of |
I understand that |
It can get tricky if you can't replay your |
Can I change |
I fail to see how this is going to help |
Sorry, I misunderstood this configuration Is there no other way to do it?
…---- Replied Message ----
| From | Andy ***@***.***> |
| Date | 09/05/2023 22:27 |
| To | golang/go ***@***.***> |
| Cc | AtlanCI ***@***.***>,
Author ***@***.***> |
| Subject | Re: [golang/go] net/http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error (Issue #62453) |
You can avoid this by assigning a valid function of func() (io.ReadCloser, error) to request.GetBody, just like the error said.
I understand that req. GetBody needs to meet the requirement of repeated reading, but my body cannot be repeated.
It can get tricky if you can't replay your r.Body, the root cause of this issue seems to be a server-side (S3) problem, maybe you should seek help from the AWS team, to find out what's happening over there.
Can I change ForceAttemptHTTP2: true, to false?
I fail to see how this is going to help
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I'm afraid there is nothing Go can do about this issue, but I'll leave this issue on and see if anyone else has a viable solution. |
thank u
---- Replied Message ----
| From | Andy ***@***.***> |
| Date | 09/05/2023 22:44 |
| To | golang/go ***@***.***> |
| Cc | AtlanCI ***@***.***>,
Author ***@***.***> |
| Subject | Re: [golang/go] net/http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error (Issue #62453) |
Sorry, I misunderstood this configuration Is there no other way to do it?
I'm afraid there is nothing Go can do about this issue, but I'll leave this issue on and see if anyone else has a viable solution.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This looks like a question about how to use Go http on S3 pseudo streaming. If you ask on a forum rather than on the issue tracker, more people will see your question, and you will get better answers. See https://golang.org/wiki/Questions . Thanks. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This problem is a bit strange, I can't reproduce it The latest version and the version I am currently using.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Program Logic
I am writing a storage platform service that accepts HTTP POST requests from users and uploads files through Forms I need to send this Form form to the S3 backend. During this process, I will not read the HTTP Body passed by the user, which is the
r.body
below, and pass it directly to S3 to achievepseudo streaming
upload Because S3 has some special authentication and other information, I useio. MultiReader()
in the following code to add my information to the body and upload it to S3.I am building a request to initiate a request to the S3 service Please note that I used
io.MultiReader()
in the sample code I provided. Please ignore it. When I calledhttp.do(req)
, it returnedhttp2: Transport: cannot retry err [http2: Transport received Server's Graceful shutdown GOAWAY] after Request. Body was written; Define Request. GetBody to avoid this error
How should I fix such an error.My HTTP client configuration
What did you expect to see?
It should upload files to a service similar to S3 normally. How should I fix this error?
What did you see instead?
It prompts the following error message.
h.Do(): Post "https://eos-xxx.cmecloud.cn/s3-bucket": http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error
The text was updated successfully, but these errors were encountered: