• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Tomcat 5.5.26 Sessions getting replicated but not working via browser

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 added:org.apache.catalina.cluster.mcast.McastMember[tcp://,catalina,,9001, 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: SessionListener: sessionDestroyed('E7E9E54600927A4826AFEDB59D7EF6E7.tomcatDargle')

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" managerClassName="org.apache.catalina.cluster.session.DeltaManager" expireSessionsOnShutdown="false" useDirtyFlag="false" notifyListenersOnReplication="true">

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

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

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

<ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener" /> <ClusterListener className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" /> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;" primaryIndicator="true" /> <Valve className="org.apache.catalina.cluster.session.JvmRouteBinderValve" 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 servers:

INFO: SessionListener: sessionCreated('730F4AD5A21CA06639BF956B9F5418CB.tomcatDargle')

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

INFO: SessionListener: sessionCreated('E7E9E54600927A4826AFEDB59D7EF6E7.tomcatTolka')

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 org.apache.catalina.cluster.mcast.McastMember[tcp://,catalina ,,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.

Posts: 67269
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"martinjd", please check your private messages for an important administrative matter.
Martin Donaghy
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a test app of my own and was able to prove that the cluster is working correctly. Its the vendor app that is having problems. I have referred the issue back to them.

Here is the app I used:

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!