-
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
HttpClient fails intermittently with "Invalid response state TRANSIENT" #5409
Comments
Can you share a stacktrace or any debug logging when this occurs? |
Sure, I will gather a stacktrace. Regarding the logs, we tried activating all Jetty loggers, but that was way to much to the point that the application didn't start anymore. |
Please enable DEBUG logs for |
We got something similar. The error does not occur every time (we download always fixed file from fixed server) - FLAPPING. Using: <jetty.version>9.4.31.v20200723</jetty.version> java.io.IOException: java.lang.IllegalStateException: Invalid response state TRANSIENT at org.eclipse.jetty.client.util.InputStreamResponseListener$Input.toIOException(InputStreamResponseListener.java:345) at org.eclipse.jetty.client.util.InputStreamResponseListener$Input.read(InputStreamResponseListener.java:313) at org.eclipse.jetty.util.IO.copy(IO.java:172) at org.eclipse.jetty.util.IO.copy(IO.java:122) at Request request = httpClient.newRequest(xmlUrl); request.send(listener); if (contentResponse.getStatus() == 200) { |
we also found this in logs:
fyi: |
@josepowera are you sure that the file is not gzipped? The stack trace shows the client is in |
@mperktold can you please describe how do you read the response content? Do you also use |
I was able to reproduce the issue, working on a fix. |
Great to hear! 👍 In case you still want to know, yes, we also use |
Hi. I checked the file regarding gzip... The file on server is not gziped. But when we download it using chrome we see that server or cloudflare as proxy has dynamically gziped file for chrome. |
@josephca is the file compressed with gzip and sent normally, or is the content-encoding on the http headers set to gzip and the body contents are sent gzipped? (small nuance, but it makes a difference) |
These are headers from chrome... I also sent link to DL link we have problems with to @sbordet via email. The file on server in filesystem is not gzipped.
|
Interesting, I see no But that would mean the response must contain a |
@mperktold @josepowera are you able to build branch |
Yes, I was able to build the branch, thanks. We will now deploy it for a while to verify. |
…se_state_transient Fixes #5409 - HttpClient fails intermittently with "Invalid response …
We deployed the branch to production for a few days and the problem has not appeared since then. So the problem seems to be fixed 👍 |
@mperktold thanks for the feedback! We are about to release Jetty 9.4.33 this week, so you will be able to upgrade soon. |
Jetty version
9.4.32.v20200930
Java version
11.0.8+10
OS type/version
Description
Since upgrading to Jetty 9.4.31, Requests sent from a Jetty
HttpClient
in our production system fail intermittently with an error saying "Invalid response state TRANSIENT".The code that throws this exception resides in
HttpReceiver
and was introduced here:e095519#diff-c4aa5ed6568d33c882382bc50f770a82R841
The server to which the failing request should go is a Jetty server of the same version in the same local network.
We are now on 9.4.32, but the problem persists.
It's not clear to us whether the problem is due to a misuse of the
HttpClient
on our side, or whether it is a bug.It's also hard to track down, since it fails intermittently and only in production.
Do you have any idea what could be the reason?
The text was updated successfully, but these errors were encountered: