Project

General

Profile

Cannot send messages between users connected to different servers in cluster mode

Peter Rajcani
Added about 4 years ago

We are running Tigase in a cluster with 2 servers connected to the same MySQL database. We can send messages from user connected to server1 to a user connected to server2 but not vice versa - the message from a user on server2 does not reach the user on server1. We have clustering mode enabled as well as the cluster strategy in init.properties on both servers:

--cluster-mode = true
--sm-cluster-strategy-class=tigase.server.cluster.strategy.OnlineUsersCachingStrategy

We see the following error in the log:

2015-01-21 15:42:12.424 [pool-18-thread-15]  ClusterConnectionManager.processHandshake()  WARNING: Handshaking password doesn't match, disconnecting: null, type: accept, Socket: nullSocket[addr=/10.10.9.83,port=55037,localport=5277], jid: null

The Tigase server version is 7.0.0 snapshot build #3736, the MySQL database is on server1. WE have the ACS component installed (the evaluation/testing version).

The issue is intermittent, sometimes the message goes through and sometimes it does not (when we see the above error)


Replies (2)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

  • Have you verified that clocks on both machines are in sync?

  • Can you share contents of the cluster_nodes table or verify that the there are only two items that mach setup nodes?

  • Can you check whether the issue persists if you enforce static nodes configuration with preset passwords (it should be the same on all nodes), i.e.:

--cluster-nodes=<node1_hostname>:pass,<node2_hostname>:pass

Added by Peter Rajcani about 4 years ago

I think it was the clock issue. I restarted both servers and we can send and receive messages both ways now.

Here is the cluster_node table, both host names are correct:

+-----------------------------------+------------------------------------------------------------------+---------------------+------+-------------+-----------+
| hostname          | password   | last_update                  | port   | cpu_usage      | mem_usage |
+-----------------------------------+------------------------------------------------------------------+---------------------+------+-------------+-----------+
| hostname1.com | ...              | 2015-01-22 13:05:01 | 5277 | 0.041445624 | 29.134089 |
| hostname2.com |  ...             | 2015-01-22 13:04:53 | 5277 | 0.033333335 | 28.792772 |
+-----------------------------------+------------------------------------------------------------------+---------------------+------+-------------+-----------+

    (1-2/2)