• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 5.5.26 Sessions getting replicated but not working via browser

 
Martin Donaghy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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 addedrg.apache.catalina.cluster.mcast.McastMember[tcp://10.17.21.125:9001,catalina,10.17.21.125,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="239.192.17.20" 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" />

</Cluster>

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://10.17.21.125:9001,catalina ,10.17.21.125,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.

Martin
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"martinjd", please check your private messages for an important administrative matter.
 
Martin Donaghy
Greenhorn
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:


thanks,
Martin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic