Configure Cluster Membership

You need to configure cluster membership by specifying all other nodes in the cluster. Be sure not to include a node in its own cluster membership. If this were done, the node would sync to itself as if it were a different node in the cluster.

A cluster member is specified by a host & port combinations as shown below:<Member className="org.apache.catalina.tribes.membership.StaticMember" port="<PORT_NUMBER>" host="<HOST_NAME>"/>

Execute the instruction given below:
  1. Open file "server.xml" for editing.
  2. Find StaticMembershipInterceptor and add all other members of the cluster.
  3. 3. Be sure not to include a node in its own cluster membership. If this were done, the node would sync to itself as if it were a different node in the cluster.
Note: Note: You need to configure the cluster membership on all the nodes when adding a new node so that every node is aware of each other.

The Cluster element in server.xml should look like this after changes:


<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8" channelStartOptions="3">
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
	<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="node.example.com" port="4210" autoBind="9" selectorTimeout="5000"
						maxThreads="6" />
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor" staticOnly="true"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
<Member className="org.apache.catalina.tribes.membership.StaticMember"
							port="4310" host="152.144.219.25"
							uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5}" />
<Member className="org.apache.catalina.tribes.membership.StaticMember"
							port="4410" host="152.144.219.110"
							uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0}" />
							</Interceptor>
							</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener" />
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
			
		
Note: Make sure ports are open and accessible from other Nodes. Check if there is any firewall installed.