"msg_history" table doesn't work when cluster mode is enabled

Keren Meir
Added over 5 years ago


When I'm using one node of Tigase server it all works good - when user is offline and someone sends him IM/presence he gets it once he becomes online. (I can see the packet in "msg_history" table until the user becomes online)

BUT, When I'm working with cluster mode (2 nodes of Tigase server) the user doesn't receive the IM/presence when he becomes online (msg_history table is empty)

Is that a bug or am I doing something wrong?


Replies (7)

Added by Wojciech Kapcia TigaseTeam over 5 years ago

Which Tigase version and clustering strategy do you use?

Added by Keren Meir over 5 years ago

Tigase version 5.2.0 beta 3 and the cluster mode in

In one node:



--cluster-nodes=x.x.x.x -> ip of the second node:

In the second node:



Added by Wojciech Kapcia TigaseTeam over 5 years ago

First of all - recent versions of Tigase doesn't need specifying cluster-nodes - nose are automatically discovered thus only --cluster-mode=true is needed. (sidenode: --cluster-nodes required proper, resolvable FQDN, not the IPs of the nodes).

As for the lost messages: are they being lost when enabling clustering or when cluster is enable and only when second nodes connect?

Added by Keren Meir over 5 years ago

First of all - good to know that only --cluster-mode=true is needed. But how does it works? How do the Tigase know which of the Tigase he should connect to? If you have Tigase with cluster mode, you will be discovered by my Tigase?

As for the lost messages: I have 2 nodes of Tigase connected through cluster (--cluster-mode=true in of both of them).

I connected 2 users: user1 to one node and user2 to the second node (both are psi clients)

I disconnect user1 and send IM from user2 to user1.

"msg_history" table is empty, and when user1 reconnect, he doesn't get user1's IM.

Do I need to enable some plugins?


Added by Wojciech Kapcia TigaseTeam over 5 years ago

I've checked latest version and couldn't replicate the issue.

  • which strategy do you use?

  • could you check latest sources/RC1? (there were some fixes regarding clustering and user presence)

  • about last question - I was merely asking in which scenarios the issue manifests:

    • clustering disabled, one node
    • clustering enabled, one node,
    • clustering enabled, two nodes

(i.e. does it manifest after enabling clustering per se or only after connecting second node)

Added by Keren Meir over 5 years ago

  1. I didn't change the default strategy, what is the options? and what is the different between them?

  2. I'll check the RC1 version if it solved the problem

  3. clustering enabled, two nodes, I started both of the servers together.

Added by Wojciech Kapcia TigaseTeam over 5 years ago

Regarding first item - there are two clustering strategies:

Of course Tigase is quite flexible thus, if you like, you can implement your own clustering strategy by implementing ClusteringStrategyIfc interface.