-
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
unexcepted org.eclipse.jetty.io.EofException is thrown when server serving requests #11704
Comments
if I run the server with debugger, start up a client to send the same request, I set a breakpoint where the httpconnection is reading from input, while the request is being read by server, I stopped the client, then I continue the server. (this probably simulates the request was read incompletely). This time the EofException propagates all the way up to one of the ExceptionMappers registered with jetty. and 500 was returned.
I’m not sure what is the expected behavior for jetty here. Should we just add a exception mapper similar to this to handle this kind of exception?: https://github.com/SDA-SE/sda-dropwizard-commons/blob/1464533eda1061cf8d374ac8d511[…]dase/commons/server/jackson/errors/EarlyEofExceptionMapper.java |
@zhaochun-ma jetty-9.4 is at end of community support. In case you missed the announcement, including your options going forward, here it is: https://www.eclipse.org//lists/jetty-announce/msg00168.html |
While we upgrade our jetty library, is this issue fixed on newer version? would you suggest adding an exception mapper to handle this kind of exception as a temporary workaround? |
There have been tens of thousands of commits of difference between Jetty 9.4.x and 12.0.x We don't have reports of similar concerns in Jetty 12.0.x, that's about as close to an answer we can provide. Note: Jetty 11 and older are all now either at End of Life or End of Community Support.
You should be running Jetty 12 at this point in time. |
Jetty version(s)
9.4.54
Jetty Environment
Java version/vendor
(use: java -version)
java 11
OS type/version
linux
Description
How to reproduce?
the below stacktrace was logged in the application when handling a request. The application was under heavy load at the time and request were experiencing long latency. This
org.eclipse.jetty.io.EofException
propagates all the way up to one of the ExceptionMappers registered with jetty. We didn't particularly handle this exception, so it was eventually returned as 500 error.I did some local debugging to mimic the scenario:
enable jetty server debug level log. start up a client to send a request and stop the client before it receives the response. The same stacktrace was logged with
but in application log, the exception wasn't caught by ExceptionMappers and the request was returned as HTTP 200.
I'm not sure if we should have an ExceptionMapper to catch this exception.
The text was updated successfully, but these errors were encountered: