Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1200

AjpClientConnection should handle a closed connection like HttpClientConnection

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0.0.Beta1, 1.4.22.Final
    • 1.4.20.Final
    • Core
    • None

      For example, if the HttpClientPingTask (NodePingUtil.java) tests the connection to a node, it closes the connection afterwards. This causes AjpClientChannel to throw a ClosedChannelException. The exceptions are only shown if log level is set to DEBUG.

      Exception:

      10:26:18,362 DEBUG (XNIO-2 I/O-4) [io.undertow] <NodePingUtil.java:322> UT005055: HttpClientPingTask run for connection: ajp://127.0.0.1:8009/?#
      10:26:18,366 DEBUG (XNIO-2 I/O-4) [io.undertow.request.io] <AbstractFramedChannel.java:817> Marking reads broken on channel AjpClientChannel peer /127.0.0.1:8009 local 0.0.0.0/0.0.0.0:42547[ No Receiver [] -- [] -- []]: java.nio.channels.ClosedChannelException
              at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:817)
              at io.undertow.protocols.ajp.AjpClientChannel.lastDataRead(AjpClientChannel.java:149)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:376)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:336)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:332)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:932)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:913)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
              at org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
              at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:466)
      
      10:26:18,368 DEBUG (XNIO-2 I/O-4) [io.undertow.request.io] <AjpClientChannel.java:160> UT005013: An IOException occurred: java.io.IOException: java.nio.channels.ClosedChannelException
              at io.undertow.protocols.ajp.AjpClientChannel.handleBrokenSourceChannel(AjpClientChannel.java:160)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:826)
              at io.undertow.protocols.ajp.AjpClientChannel.lastDataRead(AjpClientChannel.java:149)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:376)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:336)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:332)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:932)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:913)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
              at org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
              at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:466)
      Caused by: java.nio.channels.ClosedChannelException
              ... 13 more
      
      10:26:18,369 DEBUG (XNIO-2 I/O-4) [io.undertow.request.io] <AbstractFramedChannel.java:853> Marking writes broken on channel AjpClientChannel peer /127.0.0.1:8009 local 0.0.0.0/0.0.0.0:42547[ No Receiver [] -- [] -- []]: java.nio.channels.ClosedChannelException
              at io.undertow.server.protocol.framed.AbstractFramedChannel.markWritesBroken(AbstractFramedChannel.java:853)
              at io.undertow.protocols.ajp.AjpClientChannel.lastDataRead(AjpClientChannel.java:150)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:376)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:336)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:332)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:932)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:913)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
              at org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
              at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:466)
      
      10:26:18,370 DEBUG (XNIO-2 I/O-4) [io.undertow.request.io] <AjpClientChannel.java:167> UT005013: An IOException occurred: java.io.IOException: java.nio.channels.ClosedChannelException
              at io.undertow.protocols.ajp.AjpClientChannel.handleBrokenSinkChannel(AjpClientChannel.java:167)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.markWritesBroken(AbstractFramedChannel.java:855)
              at io.undertow.protocols.ajp.AjpClientChannel.lastDataRead(AjpClientChannel.java:150)
              at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:376)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:336)
              at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:332)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:932)
              at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:913)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
              at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
              at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
              at org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
              at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:582)
              at org.xnio.nio.WorkerThread.run(WorkerThread.java:466)
      Caused by: java.nio.channels.ClosedChannelException
              ... 13 more
      

            sdouglas1@redhat.com Stuart Douglas
            frapex Frank de Jong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: