-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty Http2 client discards the response fames when there is GOAWAY and sends RST_STREAM #5310
Comments
You do not say what the problem is, you just describe a normal scenario. Why do you think what you describe is an issue? |
@sukawanth What we see in your trace does indicate your server is a little strange. We see
Very strange there is more conversation after the goaway and its response. Also the multiple settings are confusing. |
hi @gregw yes you are correct there are multiple connections in play. I filter out one connection and attached the pic. We are facing a scenario where server is gracefully shutting down and is gracefully terminating all the connections established to it. So when new connections are established to the server and request is sent to it, server is accepting connection and responding to request with 200OK along with GO AWAY frame. this is observed for grace period after which connections are not accepted at server. @sbordet we expect that the response should be processed which is received with GOAWAY frame in same TCP packet. why jetty client is sending RST frame for the request? And for the client side out code is not receiving response instead seeing connection |
The problem seems on the server. The client sends a "magic" + its settings + window_update What server is it (product and version)? What do you exactly mean by "scenario where server is gracefully shutting down and is gracefully terminating all the connections established to it"? If the server is shutting down, the GOAWAY is expected, although the last stream id contained in the GOAWAY is bogus. Can you please write down exactly what you are doing, what do you expect to happen, and what actually happens instead? |
Hi @sbordet, Thanks for the reply Below is more details explanation is the issue: Environment: Test scenario: Expected behavior of jetty client: Obseravtion: Question is why jetty is not waiting for responses on connection after receiving GOAWAY frame with promised stream id as (2Pow31)-1 |
Ok, so the HTTP/2 client implementation does not wait for responses after it receives a GOAWAY, that's why it resets the stream. |
@sukawanth are you able to build and test branch |
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
… with the changes for #5310. This is important in tests that check that streams have been removed from sessions after counting down a latch in the notification. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Jetty version 9.4.27.v20200227
Java version OpenJdk 14
OS type/version Linux master 4.1.12-112.16.4.el7uek.x86_64 /Deployed in Kubernetes cluster
Description
We are using Jetty Http2 client in our application. We have a scenario where the server will terminate the connection by sending GOAWAY frame with no error along with the response header and data frames. But Jetty client cancels the request by sending RST_STREAM and terminates the connection by sending GOAWAY. In the application side client also throws "java.nio.channels.AsynchronousCloseException" without committing response.
{"thread":"@d8d9199-4177","level":"ERROR","loggerName":"Exception","message":"Internal Server Error","thrown":{"commonElementCount":0,"name":"java.nio.channels.AsynchronousCloseException","extendedStackTrace":[{"class":"org.eclipse.jetty.http2.client.http.HttpConnectionOverHTTP2","method":"close","file":"HttpConnectionOverHTTP2.java","line":144,"exact":false,"location":"http2-http-client-transport-9.4.27.v20200227.jar!/","version":"9.4.27.v20200227"}],"suppressed":[{"commonElementCount":0,"localizedMessage":"\nError has been observed at the following site(s):\n\t|_ checkpoint ⇢ Request to POST
The text was updated successfully, but these errors were encountered: