Project

General

Profile

Issue with Tigase Clustering Mode

Ryan Sultanem
Added over 3 years ago

I want to use the clustering mode in Tigase with those 2 servers: test1.example.com and test2.example.com.

I have added the corresponding lines required for clustering in /etc/init.properties as follows:

--cluster-mode = true
--cluster-nodes =  test1.example.com, test2.example.com
--cluster-connect-all = true

But whenever I try to run the server I get this error:

2015-07-03 13:50:58.833 [main]             ClusterConnectionManager.itemAdded()  WARNING: Incorrect ClusterRepoItem, skipping connection attempt:  test2.example.com:8ae2eccdfe61d0622a6629cec0eee3dcde699a1e9fdc5f34f8716d95899cea82:5277:0:0.0:0.0
java.net.UnknownHostException:  test2.example.com: unknown error
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1255)
        at java.net.InetAddress.getAllByName(InetAddress.java:1171)
        at java.net.InetAddress.getAllByName(InetAddress.java:1105)
        at java.net.InetAddress.getByName(InetAddress.java:1055)
        at tigase.cluster.ClusterConnectionManager.itemAdded(ClusterConnectionManager.java:270)
        at tigase.cluster.ClusterConnectionManager.itemAdded(ClusterConnectionManager.java:87)
        at tigase.db.comp.ConfigRepository.addItemNoStore(ConfigRepository.java:173)
        at tigase.db.comp.ConfigRepository.addItem(ConfigRepository.java:161)
        at tigase.db.comp.ConfigRepository.setProperties(ConfigRepository.java:325)
        at tigase.cluster.repo.ClConConfigRepository.setProperties(ClConConfigRepository.java:152)
        at tigase.cluster.repo.ClConSQLRepository.setProperties(ClConSQLRepository.java:281)
        at tigase.cluster.ClusterConnectionManager.setProperties(ClusterConnectionManager.java:782)
        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
        at tigase.conf.Configurator.componentAdded(Configurator.java:50)
        at tigase.conf.Configurator.componentAdded(Configurator.java:33)
        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
        at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
        at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
        at tigase.server.MessageRouter.setProperties(MessageRouter.java:807)
        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
        at tigase.conf.Configurator.componentAdded(Configurator.java:50)
        at tigase.conf.Configurator.componentAdded(Configurator.java:33)
        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
        at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
        at tigase.server.MessageRouter.setConfig(MessageRouter.java:700)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)

Whenever I remove the test1.example.com from the cluster-nodes, the init.properties files become:

--cluster-mode = true
--cluster-nodes = test2.example.com
--cluster-connect-all = true

It works fine. But I do need the cluster between those two servers.

How can I fix this error? I have found nothing around on the net, especially that the error states: Unknown error

What am I suppose to do?

Thanks in advance.

Ryan


Replies (5)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

You don't need to specify cluster nodes in the latest versions of Tigase as they will be auto-discovered. Please also make sure that your system configuration (hostnames) is correct and resolves properly.

Added by Ryan Sultanem over 3 years ago

I'm using version 5.3, do I need to upgrade?

Also, how will they be autodiscovered if they are on different servers? And is there a way of finding out if they were discovered correctly?

Thank you.

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Auto-discovery is available in that version. All nodes are tied to the shared within same database - please check cluster_nodes table.

Added by Ryan Sultanem over 3 years ago

Alright, both hosts are in the table now! Great!

How can I make sure the clustering is working correctly? Any way to test it? As in, what should the client application try to connect to? There are two servers, but they should be considered as one, I assume? Should it connect to test1.example.com or test2.example.com? Or should there be a center cluster node example.com that the client connects to and it will forward the connection/load to one of the less busy clusters?

Thank you again for your patience and help!

Added by Wojciech Kapcia TigaseTeam over 3 years ago

There is a disctinction between VHost/domain which the installation will server - be that example.com and then hostnames of acctual machines that will do the work - for example test1.example.com and @test2.example.com@. You should adjust DNS srv records for your VHost, vide http://wiki.xmpp.org/web/SRV_Records.

Your clients can enforce connecting to any node and you can verify that cluster is working correctly through Service Discovery from xmpp client and checking status of the cluster node in Cluster Connection manager node.

    (1-5/5)