Project

General

Profile

pubsub not work well in my cluster mode. can anyone help?

boruida wh
Added over 4 years ago

Tigase edition : tigase-server-5.2.0-b3447

I have 2 tigase in the cluster.

Ip are 192.168.0.46/192.168.0.70.

Below is the init.properties file on 192.168.0.70 :

config-type=--gen-config-def

--admins=admin@$a.domain

--virt-hosts = a.domain

--debug=server,cluster

--monitoring=jmx:9050,http:9080,snmp:9060

--user-db=mysql

--user-db-uri=jdbc:mysql://192.168.0.46:3306/tigasedb?user=root&password=123456&useUnicode=true&characterEncoding=UTF-8

--comp-name-1 = muc

--comp-class-1 = tigase.muc.MUCComponent

--comp-name-2 = pubsub

--comp-class-2 = tigase.pubsub.PubSubComponent

--cluster-mode = true

--cluster-nodes = a.domain,b.domain

--cluster-connect-all = true

and the same file on 192.168.0.46:

config-type=--gen-config-def

--admins=admin@a.domain

--virt-hosts = a.domain

--debug=server

--monitoring=jmx:9050,http:9080,snmp:9060

--user-db=mysql

--user-db-uri=jdbc:mysql://127.0.0.1:3306/tigasedb?user=root&password=123456&useUnicode=true&characterEncoding=UTF-8

--comp-name-1 = muc

--comp-class-1 = tigase.muc.MUCComponent

--comp-name-2 = pubsub

--comp-class-2 = tigase.pubsub.PubSubComponent

--cluster-mode = true

--cluster-nodes = b.domain,b.domain

--cluster-connect-all = true

the 2 tigase share the same v-host(a.domain), and normal message went well either if the user logged on a.domain

or b.domain.

My question comes to pubsub message in cluster mode.

I hava a user named tpubsub who is the node owner,

and the user to subscribe the node named test01.

if user tpubsub create a node (node name node20140813) on 192.168.0.46,

and user test01 subscribe node20140813 on the same ip(192.168.0.46),

all will go well.(tpubsub publish items and test01 can receive the messages)

If tpubsub create a node node20140813_2 on 192.168.0.46

and user test01 subscribe node20140813_2 on 192.168.0.70.

user test01 can subscribe successfully, and receive the successful ack as below

but, when I check the node subscribers, I see only one subscriber, test01 is not there.

node20140813 has 2 subscribers that is correct.

and the same question happens when user test01 unsubscribes the node on another ip, the ack iq

shows unsubsribed successfully, but the node subscribers shows not.

However, if user tpubsub and test01 are on the same ip, pub sub message is ok. I donot know why?


Replies (2)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

As you are using older version of Tigase (@tigase-server-5.2.0-b3447@) then this version did not support clustering of either PubSub or MUC hence the issue (basically each node has separate component with separate data). To mitigate that (with your current version) you have two options:

Added by boruida wh over 4 years ago

Thanks, I'll try virtual component this time.

By time way, I would like to debug the tigase codes,

could you lead me a way to do some tests with NetBeans or any other java dev tools?

https://projects.tigase.org/boards/4/topics/2897

    (1-2/2)