powered by Jive Software

Got a NPE in ComponentStanzaHandler in clustered environment

I am not sure if this problem is truly related Openfire clustering. I was using Openfire 4.2.3 in a cluster with two nodes. A Jitsi Videobridge (an external component) was connected to a Google Internal Load Balancing which connected to these two nodes. When I shut down the Openfire node which the Jitsi Videobridge was connecting to, the Jitsi Videobridge was trying to reconnect to the 2nd Openfire node (via the load balancer) but it kept getting socket disconnected. In the Openfire log, the NullPointerException was being logged:

2018.08.21 02:50:34 WARN  [socket_c2s-thread-2]: org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory - No cluster members selected for cluster task org.jivesoftware.openfire.muc.cluster.UpdateOccupant
2018.08.21 02:50:34 WARN  [socket_c2s-thread-2]: org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory - No cluster members selected for cluster task org.jivesoftware.openfire.muc.cluster.BroadcastPresenceRequest
2018.08.21 02:50:36 WARN  [Jetty-QTP-AdminConsole-31]: org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory - No cluster members selected for cluster task org.jivesoftware.openfire.session.GetSessionsCountTask
2018.08.21 02:50:37 ERROR [component-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message: <handshake>0e3722cfd1048d00b44b64bd404deff03cccaf0b</handshake>
java.lang.NullPointerException
        at org.jivesoftware.openfire.net.ComponentStanzaHandler.processUnknowPacket(ComponentStanzaHandler.java:66)
        at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:317)
        at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:201)
        at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:177)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
        at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
        at org.jivesoftware.openfire.plugin.RawPrintFilter.messageReceived(RawPrintFilter.java:107)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
        at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
        at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
        at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
        at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)
        at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761)
        at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703)
        at java.lang.Thread.run(Thread.java:748)

Has anyone seen this problem before?