There is an NPE is SSL failover scenario
2017-07-20 08:39:26,057 ERROR [io.undertow.client] (default I/O-1) UT005001: An exception occurred processing the request: java.lang.NullPointerException at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:761) at io.undertow.protocols.ssl.SslConduit.read(SslConduit.java:565) at org.xnio.conduits.PushBackStreamSourceConduit.read(PushBackStreamSourceConduit.java:52) at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127) at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:488) at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:473) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1122) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:571) 2017-07-20 08:39:26,058 ERROR [org.xnio.listener] (default I/O-1) XNIO001007: A channel event listener threw an exception: java.lang.NullPointerException at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:603) at io.undertow.client.http.HttpClientConnection$ClientReadListener.handleEvent(HttpClientConnection.java:473) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1122) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
It was spotted in ssl failover scenario.
- Set up balancer with 2 workers that communicate via ssl
- Send request
- Shutdown worker that handled the request
- Check if everything is ok
- Repeat
After few failovers, undertow balancer starts to throw NPE. At this point, the worker cannot completely join with balancer and is marked as DOWN with repeating NPE showing in the balancer log. Unfortunately, there is some race condition and I cannot reproduce it efficiently. This issue comes with ssl connection as there is no NPE in non ssl failover tests.
Edit: Updated error message as 7.0.x uses older version and line numbers are different.
- clones
-
JBEAP-11745 (7.x) NPE in io.undertow.client
- Resolved