cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Best way to configure jgroups without multicast / running in azure or any other cloud

Former Member
0 Likes
1,056

Most cloud providers do not allow any multicast connects between nodes. When nodes are joining the cluster they need another kind of strategy to discover the other cluster nodes. With jgroups you can achieve this via the JDBC_PING strategy.

The parameters hybris.database.username / password / url / driver are explicitly needed and may be identical to the corresponding db.url, db.password, ... properties.

Is there a better way?

I had success with the following properties:

 clustermode=true
 cluster.nodes.autodiscovery=true
 cluster.broadcast.methods=jgroups
 cluster.broadcast.method.jgroups.configuration=jgroups-tcp.xml
 hybris.database.username=<VALUE>
 hybris.database.password=<VALUE>
 hybris.database.driver=<VALUE>
 hybris.database.url=<VALUE>
 hybris.jgroups.bind_port=9999
 hybris.jgroups.schema=<SQL_DDL>
 
 for MS-SQL use:
 
 IF NOT EXISTS (  SELECT [name] FROM sys.tables WHERE [name] = 'JGROUPSPING' ) 
 CREATE TABLE JGROUPSPING (own_addr varchar(200) NOT NULL, cluster_name varchar(200) NOT NULL, 
 ping_data varbinary(5000) DEFAULT NULL, PRIMARY KEY (own_addr, cluster_name))
 
 for MySQL use:
 
 CREATE TABLE IF NOT EXISTS JGROUPSPING (own_addr varchar(200) NOT 
 NULL, cluster_name varchar(200) NOT NULL, ping_data varbinary(5000) 
 DEFAULT NULL, PRIMARY KEY (own_addr, cluster_name)) ENGINE=InnoDB 
 DEFAULT CHARSET=utf8 COLLATE=utf8_bin

 

Accepted Solutions (0)

Answers (1)

Answers (1)

cybersolutions
Discoverer
0 Likes

how did u setup ur tcp cluster xml file ?

i am getting
2021-03-22 18:23:44,846 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-2 timed out (after 3000 ms), on try 9 2021-03-22 18:23:47,849 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-3 timed out (after 3000 ms), on try 9 2021-03-22 18:23:50,850 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-2 timed out (after 3000 ms), on try 9 2021-03-22 18:23:53,850 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-0 timed out (after 3000 ms), on try 9 2021-03-22 18:23:56,851 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-3 timed out (after 3000 ms), on try 9 2021-03-22 18:23:59,853 WARN [] [localhost-startStop-1] [org.jgroups.protocols.pbcast.GMS] hybrisnode-2: JOIN(hybrisnode-2) sent to hybrisnode-1 timed out (after 3000 ms), on try 9