tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martinjd <>
Subject Tomcat 5.5.26 Sessions getting replicated but not working via browser
Date Tue, 08 Jul 2008 09:35:11 GMT

I have configured Tomcat 5.5.26 to be clustered across 2 machines with one
instance on each. These two machines are behing a BIG-IP loadbalancer which
is setup for sticky sessions. 

The catalina.out states that the member can see each other: 

Jul 3, 2008 6:33:50 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded INFO: Replication member
alive=38753] Jul 3, 2008 6:33:51 PM
org.apache.catalina.cluster.mcast.McastService registerMBean 

The localhost.2008-07-03.log states that the sessions are being replicated
for the jsp-examples app - book example. I have an app of our own that does
not even state that the session is replicated but I though I would start
here with getting the example one working. 

Jul 3, 2008 6:34:31 PM org.apache.catalina.core.ApplicationContext log INFO:

However, when I take down the instance which created the session and attempt
to refresh the page or navigate to another page I get page cannot be
displayed. This shows that the sessions are not completely replicated. What
am I missing? 

I have added my server.xml file contents: 

<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
expireSessionsOnShutdown="false" useDirtyFlag="false"

<Membership className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="" mcastPort="9002" mcastFrequency="500"

<Receiver className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto" tcpListenPort="9001" tcpSelectorTimeout="100"

<Sender className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled" ackTimeout="15000" waitForAck="true"/> 

className="org.apache.catalina.cluster.session.ClusterSessionListener" />
/> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
primaryIndicator="true" /> <Valve
enabled="true" /> 


The app I am using is the jsp-examples/book example. 

The load balancer is sending requests to both servers. 

When the dargle instance is sent a request I can see in the logs of both

INFO: SessionListener:

When the tolka instance is sent a request I can see in the logs of both

INFO: SessionListener:

When the server starts up the relevant info is in the logs: 

Jul 3, 2008 6:33:56 PM org.apache.catalina.cluster.session.DeltaManager
start INFO: Starting clustering manager at /jsp-examples Jul 3, 2008 6:33:56
PM org.apache.catalina.cluster.session.DeltaManager getAllClusterSessions
WARNING: Manager [/jsp-examples], requesting session state from
,,9001, alive=44363]. This operation will timeout if no session
state has been received within 60 seconds. Jul 3, 2008 6:33:56 PM
org.apache.catalina.cluster.session.DeltaManager waitForSendAllSessions
INFO: Manager [/jsp-examples]; session state send at 7/3/08 6:33 PM received
in 123 ms. 

The jsp-examples book example is supposed to have serilizable object and was
recommended on some sites are the way to test out the replication. Is there
any other way to test this? 

Also, the main purpose of the cluster is to replicate an application from an
external vendor which they say is compatible with session replication.
However, this app does not even output the sessionCreated message so I am
unsure if it truly is compatible. 

If I could prove that the cluster is setup correctly then I would have more
to go on when contacting the vendor. At the moment I am unsure if the
cluster is setup correctly for session replication. 

Any help at all would be greatly appreciated. 


View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message