Modeshape 5 Cluster Configuration (not Wildfly)
scott.reisdorf Mar 16, 2017 11:48 PMIs there any sample configuration that shows how to setup a cluster where 2 separate JVM instances are configured using a clustered Modeshape?
I am using Modeshape 5..2-Final without Wildfly.
I am unable to get the 2 instances to work correctly in clustered mode.
I setup the jgroups-config.xml and the modeshape JSON configuration and each instance starts up and says its in a cluster:
-------------------------------------------------------------------
GMS: address=ip-172-xx-x-xxx-xxxx, cluster=cluster1, physical address=172.xx.x.xxx:7800
------------------------------------------------------------------
The problem I am seeing is if I login to one instance and make a change to modeshape (i.e. add a node) the second instance doesn't see that change. The only why I can get the other instance to see the change is if that instance adds a new node in the system upon which then its able to query and see the updates from the other instance.
Any help is appreciated.
I have tried a number of jgroup configurations. Here is a sample of one attempt that doesnt seem to work:
Host A and Host B have this jgroup configuration with their respective IP address in the <HOST_A/B_IP> :
jgroups-config.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:org:jgroups"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
<TCP bind_port="7800"
recv_buf_size="${tcp.recv_buf_size:5M}"
send_buf_size="${tcp.send_buf_size:5M}"
max_bundle_size="64K"
max_bundle_timeout="30"
sock_conn_timeout="3000"
timer_type="new3"
timer.min_threads="4"
timer.max_threads="10"
timer.keep_alive_time="3000"
timer.queue_max_size="500"
thread_pool.enabled="false"
oob_thread_pool.enabled="false"/>
<TCPPING initial_hosts="<HOST_A_IP>[7800],<HOST_B_IP>[7800]}"
port_range="0" num_initial_members="2" />
<MPING/>
<MERGE3 min_interval="10000"
max_interval="30000"/>
<FD timeout="3000" max_tries="3" />
<VERIFY_SUSPECT timeout="1500" />
<BARRIER />
<pbcast.NAKACK2 use_mcast_xmit="false"
discard_delivered_msgs="true"/>
<UNICAST3 />
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="4M"/>
<pbcast.GMS join_timeout="3000" view_bundling="true"/>
<MFC max_credits="2M"
min_threshold="0.4"/>
<FRAG2 frag_size="60K" />
<pbcast.STATE_TRANSFER/>
</config>
modeshape-config.json
"clustering" : {
"clusterName" : "cluster1",
"configuration" : "jgroups-config.xml",
"locking" : "db"
},
Again Any help is appreciated.
Thanks.
-Scott