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

Undertow mod_cluster proxy: AjpClientConnection: XNIO001007: java.lang.NullPointerException

    XMLWordPrintable

Details

    Description

      A simple failover between worker nodes connected via AJP causes NPE on Windows. I find it kinda weird that I didn't encounter it on RHEL, but it could be just a coincidence. The JDK, number of processors and the test scenario is clearly depicted in the attached debug log file: [^server.log.zip]. I find NPE ERRORs in the log unacceptable, given the situation that is not out of ordinary in a HA setup. On the other hand, the error wasn't propagated to the client, hence merely Major priority.

      Pertinent excerpt

      05:20:29,326 ERROR [org.xnio.listener] (default I/O-16) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException
      at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:339)
      at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:312)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:909)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:890)
      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.WorkerThread.run(WorkerThread.java:559)
      
      05:20:29,326 ERROR [io.undertow.client] (default I/O-10) UT005001: An exception occurred processing the request: java.io.IOException: An existing connection was forcibly closed by the remote host
      at sun.nio.ch.SocketDispatcher.read0(Native Method)
      at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
      at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
      at sun.nio.ch.IOUtil.read(IOUtil.java:192)
      at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
      at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:286)
      at io.undertow.conduits.IdleTimeoutConduit.read(IdleTimeoutConduit.java:202)
      at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
      at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:365)
      at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:316)
      at io.undertow.client.ajp.AjpClientConnection$ClientReceiveListener.handleEvent(AjpClientConnection.java:312)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:909)
      at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:890)
      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.WorkerThread.run(WorkerThread.java:559)
      

      Balancer's configuration: Pretty much default:

      <filters>
          <response-header name="server-header" header-name="Server" header-value="JBoss-EAP/7"/>
          <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
          <mod-cluster name="modcluster" advertise-socket-binding="modcluster-adv" management-socket-binding="http"/>
      </filters>
      

      JIRA finds the same XNIO error in JBEAP-3379, so perhaps jmesnil might give an opinion...

      WDYT?

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              sdouglas1@redhat.com Stuart Douglas
              Michal Karm Michal Karm
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: