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

How can the client automate the handling of the GOAWAY signal? #7053

Closed
SpecialYang opened this issue Mar 20, 2024 · 5 comments
Closed

How can the client automate the handling of the GOAWAY signal? #7053

SpecialYang opened this issue Mar 20, 2024 · 5 comments

Comments

@SpecialYang
Copy link

I am using the go grpc client. When the server sent the go away frame to client, the grpc client just throw error but not do anything. How can the client automate the handling of the GOAWAY signal to reconnect?

@zasweq
Copy link
Contributor

zasweq commented Mar 20, 2024

Our GOAWAY handling is described in this RFC: https://httpwg.org/specs/rfc7540.html#rfc.section.6.8. When the server sends the first GOAWAY, it usually gives some time to the client to terminate the connection gracefully, before sending the second GOAWAY (at which point, the connection is hard closed). When the connection gets hard closed, the Channel can retry connecting at that point. Our built in client HTTP/2 transport handles these GOAWAY frames already (see https://github.com/grpc/grpc-go/blob/master/internal/transport/http2_client.go#L855).

@zasweq zasweq closed this as completed Mar 20, 2024
@SpecialYang
Copy link
Author

But I receive the following error.

rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: NO_ERROR

Seems like the grpc client doesn't resolve the GOAWAY. I can't find any reason. Please help me.

@SpecialYang
Copy link
Author

@zasweq Sorry for ping. Could you help me to solve the above error? I can't find why this error will happen.

@dfawley
Copy link
Member

dfawley commented Mar 22, 2024

@SpecialYang Is the server you're talking to gRPC-Go? Can you give more data?

The client will reconnect when this happens. But the RPC has failed, and there's no way to prevent this from the client side. You'll need to retry the RPC. We can't do this automatically once the stream has been started, because it could be unsafe depending on the specific RPC's behavior.

Copy link

This issue is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

@github-actions github-actions bot added the stale label Mar 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants