Skip to end of metadata
Go to start of metadata

Clustering the Application Server

Tomcat 6 supports clustering of two or more application servers for session replication and failover. And because BI platform sessions are serialized, a user session can fail-over seamlessly to another instance of Tomcat, even when an application server fails. For example, if a user is connected to an application server that fails while the user is navigating a folder hierarchy. With a correctly configured application server cluster, the user may continue navigating the folder hierarchy without being redirected to the login page or to the root folder.

Additional Information

For more information about configuring Tomcat 6 in a cluster, see the "How To" here

To configure the Application Server cluster

  1. Log in to machine vantgvmwinpb02 using the account SVN_WEBTIER.
  2. Make a backup copy of the server.xml file located in c:\tomcat6\conf, renaming it (for example) server_precluster.xml.
  3. In a text editor, open server.xml, go to the cluster section, and replace the following:
    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

        With the following:

 <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
 <Manager className="org.apache.catalina.ha.session.DeltaManager"
 expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>
 <Channel className="">
 <Membership className="org.apache.catalina.tribes.membership.McastService"
 address="" port="45564" frequency="500" dropTime="3000"/>
 <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
 address="auto" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/>
 <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
 <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
 <Interceptor className=""/>
 <Interceptor className=""/>
 <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"/> <!-- In Tomcat8 this line must be removed -->
 <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>

The code for <cluster> represents the default cluster configuration, which functions properly for this pattern. Cluster membership is defined by the Multicast address That value changes between independent clusters if you have several running on the same network. Session replication takes place over TCP/IP and uses port 4000 for communication.

4. Save and close the file.
5. Repeat Steps 1 - 4 on the machine named vantgvmwinpb03.
6. When you have completed setting up clustering on vantgvmwinpb03, restart Tomcat.
The output from catalina.out will have an additional component when the second cluster member starts. At that point, the member will join the cluster. This is indicated in Tomcat as follows:

Mar 2, 2012 11:11:39 AM org.apache.catalina.ha.tcp.SimpleTcpCluster startInternalINFO: Cluster is about to start
INFO: Setting cluster mcast soTimeout to 500
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:4
>> Mar 2, 2012 11:11:40 AM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
INFO: Sleeping for 1000 milliseconds to establish cluster membership, start level:8

The Tomcat cluster is now functional.

  • No labels


  1. look like this Application cluster configuration is no longer works for BI 4.2 with Tomcat. The Tomcat itself is not starting up.

  2. In Tomcat 8 the line <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/> must be removed, this class was deprecated in Tomcat 8 and is now included in another method in a different class. Tomcat 8 will fail to start up if this exists in Tomcat 8