Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3757

websocket Tomcat logs errors on refresh

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly, 8.5.0
    • Fix Version/s: 8.5.0
    • Component/s: ZK Update Engine
    • Security Level: Jimmy
    • Labels:
    • Environment:

      tested with embedded Tomcat 8.5.20
      does not happen with Jetty 9.4

      Description

      Steps to Reproduce

      use tomcat enable websockets
      load any page (might just contain a <div>)
      refresh it (F5)

      Current Result

      tomcat logs the following errors:

      Sep 25, 2017 5:56:41 PM org.zkoss.zkmax.au.websocket.WebSocketEndPoint onError
      WARNING: SERVER ERROR
      java.io.IOException: java.io.IOException: An established connection was aborted by the software in your host machine
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:315)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)
      	at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:592)
      	at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:512)
      	at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347)
      	at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:289)
      	at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
      	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
      	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
      	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
      	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
      	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
      	at sun.nio.ch.SocketDispatcher.write0(Native Method)
      	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
      	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
      	at sun.nio.ch.IOUtil.write(IOUtil.java:65)
      	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
      	at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
      	at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
      	at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
      	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1261)
      	at org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670)
      	at org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607)
      	at org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597)
      	at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:95)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
      	... 19 more
      
      Sep 25, 2017 5:56:41 PM org.apache.coyote.AbstractProtocol$ConnectionHandler process
      SEVERE: Error reading request, ignored
      java.lang.NullPointerException: Deflater has been closed
      	at java.util.zip.Deflater.ensureOpen(Deflater.java:559)
      	at java.util.zip.Deflater.deflate(Deflater.java:440)
      	at org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:345)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:284)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250)
      	at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191)
      	at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
      	at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.sendText(WebSocketEndPoint.java:284)
      	at org.zkoss.zkmax.au.websocket.WSAuWriter.close(WSAuWriter.java:57)
      	at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.onError(WebSocketEndPoint.java:133)
      	at org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:605)
      	at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:512)
      	at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:347)
      	at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:289)
      	at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
      	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
      	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
      	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
      	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
      	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      

      Expected Result

      investigate errors if relevant or should be caught/muted

        Attachments

          Activity

            People

            Assignee:
            wenninghsu wenninghsu
            Reporter:
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: