Project

General

Profile

WebSocket Clustering Bug with --cm-see-other-host=none?

Justin Posey
Added about 5 years ago

Stack:

We have init.properties configured as follows:

# Load balancing is accomplished outside the scope of Tigase, so disable Tigase load balancing
--cm-see-other-host=none

During server startup, we get a NullPointerException:

2014-02-28 15:20:20,345 ERROR             t.c.ClusterConnectionManager [pool-14-thread-27] - Handshaking error.
java.lang.NullPointerException: null
        at tigase.cluster.WebSocketClientConnectionClustered.nodeConnected(WebSocketClientConnectionClustered.java:100) ~[tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.cluster.ClusterController.nodeConnected(ClusterController.java:156) ~[tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.cluster.ClusterConnectionManager.serviceConnected(ClusterConnectionManager.java:962) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.cluster.ClusterConnectionManager.processHandshake(ClusterConnectionManager.java:1150) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.cluster.ClusterConnectionManager.processSocketData(ClusterConnectionManager.java:459) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.server.ConnectionManager.packetsReady(ConnectionManager.java:438) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.server.ConnectionManager.packetsReady(ConnectionManager.java:83) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.net.IOService.call(IOService.java:264) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at tigase.net.IOService.call(IOService.java:103) [tigase-friends-plugin-3.1.0.738.master-jar-with-dependencies.jar:na]
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_06]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_06]
        at java.lang.Thread.run(Unknown Source) [na:1.7.0_06]

Line 100 of tigase.cluster.WebSocketClientConnectionClustered attempts to use see_other_host_strategy, but it is null:

see_other_host_strategy.setNodes(connectedNodes);

It appears that see_other_host_strategy == null is ok, because tigase.server.xmppclient.ClientConnectionManager.getSeeOtherHostInstance() explicitly sets it to null:

if (see_other_host_class.equals("none")) {
    return null;
}

I think WebSocketClientConnectionClustered needs to be changed to check see_other_host_strategy for null, like so:

if (see_other_host_strategy != null) {
    see_other_host_strategy.setNodes(connectedNodes);
}

Would someone please confirm if that is the case? Thanks!


Replies (1)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

I have added a bug report: #1757 and added you to the watchers list.

    (1-1/1)