ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

Message is not routed to all session in different nodes.

Open iPPLE opened this issue 3 years ago • 2 comments

I am running a cluster of 2 nodes, which having these following sessions in sm table

username node resource priority
alice [email protected] alice_001 0
alice [email protected] alice_002 0
bob [email protected] bob_001 0

When bob send message to alice only alice session which is in the same node as bob (node2) can receive the message.

  • ejabberd-21.01.7
  • Ejabberd clustering is up properly means either node is down the service still continue to work.

NOTE : It is working again after i restart both nodes.. and it is stop working after a while so i need to restart the both nodes time after time.. plz help..

I don't use cache for sm sm_use_cache: false

Please help to advice. Thanks.

iPPLE avatar Aug 15 '22 06:08 iPPLE

Are you sending the exact same stanza when it works and later when it fails?

This stanza will be delivered only to one client, the one connected in node1:

<message id='27:193807'
	type='chat'
	to='alice@localhost/alice_001'>
  <body>hi first node</body>
</message>

This stanza will be delivered to all the connected clients, the one in node1 and the one in node2:

<message id='27:193807'
	type='chat'
	to='alice@localhost'>
  <body>hi all</body>
</message>

badlop avatar Sep 21 '22 14:09 badlop

Are you sending the exact same stanza when it works and later when it fails?

This stanza will be delivered only to one client, the one connected in node1:

<message id='27:193807'
	type='chat'
	to='alice@localhost/alice_001'>
  <body>hi first node</body>
</message>

This stanza will be delivered to all the connected clients, the one in node1 and the one in node2:

<message id='27:193807'
	type='chat'
	to='alice@localhost'>
  <body>hi all</body>
</message>

Yes I sent the same message as always. I think server side manage this resources suffix..

iPPLE avatar Oct 01 '22 04:10 iPPLE