shutup1
shutup1

Reputation: 169

Unable to do clustering in Tigase Server on CentOS6.10 64 Bit

I am trying to do clustering in CentOS 6.10

My versions of Jdk , JRE=

java version "1.8.0_60" javac 1.8.0_60

This is my config.tdsl file for ip =192.168.4.109

admins = [
    '[email protected]'
]
'config-type' = 'default'
debug = [ 'server' ]
'default-virtual-host' = 'imrggn.com'
dataSource () {
    default () {
        uri = 'jdbc:derby:tigasedb;create=true'
    }
}
'audit-log' () {}
http () {
    setup () {
        'admin-password' = 'tigase'
        'admin-user' = 'admin'
    }
}
pubsub () {
    trusted = [ 'http@{clusterNode}' ]
}
'sess-man' () {
    'audit-log' () {}
}



'dns-resolver' {
-'tigase-resolver-class' = -'tigase.util.DNSResolverDefault'
-'tigase-primary-address' = -'192.168.4.109'
-'tigase-secondary-address' = -'192.168.4.109'
}

stun (class: tigase.stun.StunComponent) {
-'stun-primary-ip' = -'mc2.imrggn.com'
-'stun-primary-port' = 3478
-'stun-secondary-ip' = -'hey-sjain-l'
-'stun-secondary-port' = 7001


}

'cluster-mode' = true
'cluster-nodes' = [ -'mc2.imrggn.com', -'mc1.imrggn.com']

When I run Wireshark ie tcp.port==5277 , I see nothing there at all where the default port is 5277 only , hence it shows no value over there on neither of the machines

But lsof -iTCP:5277 shows java 21155 root 175u IPv6 733910 0t0 TCP *:5277 (LISTEN)

My ip = 192.168.4.109 hostname = mc2.imrggn.com And for the other machine is My ip = 192.168.4.111 hostname = mc1.imrggn.com

What is wrong ?

Upvotes: 0

Views: 92

Answers (1)

Wojtek
Wojtek

Reputation: 2064

The problem boils down to your database setup (`uri = 'jdbc:derby:tigasedb;create=true') - for the clustering to work (and make sense) you would have to use a database, that would be available to all cluster nodes (in this case MySQL, PostgreSQL, Microsoft SQLServer or MongoDB).

The reason is two-fold:

  • if you would use local DerbyDB on all nodes then all information would be local (i.e. you would have different list of users on each node
  • (more important) Tigase uses cluster auto-discover which utilizes the database (each node announces it's availability via shared database)

Upvotes: 0

Related Questions