tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <cla...@renegat.net.INVALID>
Subject Re: Silencing broken pipe I/O exceptions
Date Sat, 21 Apr 2018 15:35:39 GMT
This log emanates from org.apache.coyote.AbstractProcessor.setErrorState().

It's very verbose using SSE, and probably not very useful in the general 
case, 99% of the time it just means that the connection was closed on 
the client side.

Is there any serious reason for this error to log something on [info] ?

   Claude


On 22/03/2018 15:51, Claude Brisson wrote:
> Hi all.
>
> I have set up a server-side events mechanism using tomcat (and 
> https://github.com/byjg/jquery-sse), and everything is working smoothly.
>
> But each time the server tries to send some data on an SSE channel 
> which has just been closed on the client side, even though this 
> exception is catched and handled in my SSE servlet, I see this 
> exception in the webapp log:
>
> java.io.IOException: Broken pipe
>     at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:1.8.0_101]
>     at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) 
> ~[?:1.8.0_101]
>     at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) 
> ~[?:1.8.0_101]
>     at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[?:1.8.0_101]
>     at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) 
> ~[?:1.8.0_101]
>     at 
> org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1241)

> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607)

> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.coyote.ajp.AjpProcessor.flush(AjpProcessor.java:1096) 
> ~[tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:279) 
> [tomcat-coyote.jar:8.5.9]
>     at org.apache.coyote.Response.action(Response.java:168) 
> [tomcat-coyote.jar:8.5.9]
>     at 
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:317) 
> [catalina.jar:8.5.9]
>     at 
> org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:284) 
> [catalina.jar:8.5.9]
>     at 
> org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:118) 
> [catalina.jar:8.5.9]
>     at 
> info.macias.sse.servlet3.ServletEventTarget.send(ServletEventTarget.java:121) 
> [jeasse-servlet3-0.11.1.jar:?]
>     at 
> info.macias.sse.servlet3.ServletEventTarget.send(ServletEventTarget.java:35) 
> [jeasse-servlet3-0.11.1.jar:?]
>     at 
> info.macias.sse.EventBroadcast.broadcast(EventBroadcast.java:165) 
> [jeasse-common-0.11.1.jar:?]
>     [...]
>
> With a lot of users this can really pollute the logs. Is there any way 
> to silence this stacktrace?
>
> I'm using Java 1.8.0_101 on linux 64 bits, and Tomcat 8.5.9.
>
> Thanks,
>
>   Claude
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message