Jersey, An I/O error has occurred while writing a response message
Asked Answered
A

2

13

I use SpringBoot and Jersey into my project and I often tackle the following error :

[ERROR - ServerRuntime$Responder - 2018-02-13 13:16:45,983] An I/O error has occurred while writing a response message entity to the container output stream.
org.glassfish.jersey.server.internal.process.MappableException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
        at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:92)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
        at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711)
        at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)
        at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

It results with a 503 status response to my client. Could you explain me why this error occured ?

Thanks

Alvaroalveolar answered 13/2, 2018 at 13:31 Comment(0)
G
7

This kind of error usually happens servlet is writing data back on the stream and connection closed from client side. It is like server in sending some data may be file, string, bytes etc.. but on client side like a browser has closed the connection, like you close the browser tab. It cased early End of file exception on the server.

Graniela answered 11/7, 2019 at 21:52 Comment(0)
C
2

I have had this exception when I accidentally passed a null Response at the end of a call. You can verify this in the'caused by' section following the first exception:

Caused by: org.eclipse.jetty.io.EofException: null

Camlet answered 13/6, 2022 at 8:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.