Project

General

Profile

How a tigase cluster is established?

Orange Yellow
Added over 4 years ago

I have 3 servers with the OS Linux. Each of them has been installed Tigase and MySQL.

Could you please tell me how to establish a tigase cluster including the 3 servers?

Thank you.


Replies (6)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

All you need to do is to switch clustering mode on: http://www.tigase.org/content/cluster-mode

Added by Orange Yellow over 4 years ago

I have established a cluster including 2 Linux servers: ddd and tsung213. But it seems that the cluster does not work.

The init.properties in ddd is:

@

config-type=--gen-config-def

--admins=admin@myserver

--virt-hosts =myserver

--debug=server,cluster

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

--user-db=mysql

--user-db-uri=jdbc:mysql://10.3.93.213:3306/tigase_db?user=tigase_user&password=123456&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

--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 = tsung213,ddd

--cluster-connect-all = true

--sm-cluster-strategy-class=tigase.cluster.strategy.SMNonCachingAllNodes

@

And the init.properties in tsung213 is:

@

config-type=--gen-config-def

--admins=admin@myserver

--virt-hosts =myserver

--debug=server,cluster

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

--user-db=mysql

--user-db-uri=jdbc:mysql://localhost:3306/tigase_db?user=tigase_user&password=123456&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

--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 = tsung213,ddd

--cluster-connect-all = true

--sm-cluster-strategy-class=tigase.cluster.strategy.SMNonCachingAllNodes

@

The /etc/hosts in the both servers is:

@

127.0.0.1 localhost

10.3.93.212 ddd

10.3.93.213 tsung213

@

With a Windows computer in the same LAN with ddd and tsung213, I wanted to login with the count admin@myserver in Pandion. But it failed. Then I wanted to register an account in myserver, it failed again.

Could you please tell me how to make the cluster work normally?

Thank you very much!

Added by Wojciech Kapcia TigaseTeam over 4 years ago

First of all - which Tigase version do you use? With the latest version you virtually don't need to provide detailed clustering configuration as all nodes will be discovered automatically (each node stores it's detail in the shared database repository).

However it's essential to correctly configure your machine that it has proper hostname (also FQDN that is picked up by Tigase, you can check that in @logs/tigase-console.log@).

Could you also explain why login failed? Was there any error from the server? Any information in server logs? Does single node Tigase works ok?

Added by Orange Yellow over 4 years ago

Wojciech Kapcia wrote:

First of all - which Tigase version do you use? With the latest version you virtually don't need to provide detailed clustering configuration as all nodes will be discovered automatically (each node stores it's detail in the shared database repository).

However it's essential to correctly configure your machine that it has proper hostname (also FQDN that is picked up by Tigase, you can check that in @logs/tigase-console.log@).

Could you also explain why login failed? Was there any error from the server? Any information in server logs? Does single node Tigase works ok?

The version is tigase-server-5.2.0-b3447-dist.

After I deleted the line:

@

--sm-cluster-strategy-class=tigase.cluster.strategy.SMNonCachingAllNodes

@

With the cluster, I can login, add contacts and send messages.But I can not receive messages.

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Again - what are the symptoms? Are both users connected to the same cluster-node? Do they see each other presence?

Added by Orange Yellow over 4 years ago

Wojciech Kapcia wrote:

Again - what are the symptoms? Are both users connected to the same cluster-node? Do they see each other presence?

Thank you. I changed the configuration of XMPP clients and the cluster works OK now.

    (1-6/6)