Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6767

Do not log error for broken pipes in websocket connections

    XMLWordPrintableJSON

Details

    Description

      We had some "IOException: Broken pipe" errors on production:

       Apr 10 14:34:26  ERR o.a.w.p.w.j.WicketEndpoint An error occurred in web socket connection with id : f2d
       Apr 10 14:34:26  #011java.io.IOException java.io.IOException: Broken pipe
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:315)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:612)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:532)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:289)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
       Apr 10 14:34:26  #011at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
       Apr 10 14:34:26  #011at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
       Apr 10 14:34:26  #011at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59)
       Apr 10 14:34:26  #011at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
       Apr 10 14:34:26  #011at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
       Apr 10 14:34:26  #011at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
       Apr 10 14:34:26  #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
       Apr 10 14:34:26  #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
       Apr 10 14:34:26  #011at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       Apr 10 14:34:26  #011at java.base/java.lang.Thread.run(Thread.java:834)
       Apr 10 14:34:26  #011Caused by: java.io.IOException: Broken pipe 
      

      There already is condition that checks for EOFException in WicketEndpoint. Maybe it could be extended to broken pipes?

      	@Override
      	public void onError(Session session, Throwable t)
      	{
      		if (t instanceof EOFException)
      		{
      			LOG.debug("An error occurred in web socket connection with id : {}", session.getId(), t);
      		}
      		else
      		{
      			LOG.error("An error occurred in web socket connection with id : {}", session.getId(), t);
      		}
      	}
      

      My only option at the moment is to completely turn off logging for WicketEndpoint.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            thomas.heigl Thomas Heigl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: