Tomcat 6 Clustering Issue

L

laith.canada

It seems that I am at the point where my webapp is one step away from
being fully as clustered. I have two tomcat instance running on two
different machines that support multicast. Both instances upon startup
see each other and register their members at both side. In addition, I
got the loadbalancer working with stick_session (to keep a user
request with sessionid talking to the same instance that was given
from - part of Tomcat cluster requirements). However, the issue I am
running into is that when one instance shutdown the loadbalancer will
notice the failure and redirect all users to the other instance. But
the users are being prompted with login page (as part of my webapp
authentication) and that shouldn't be the case. Tomcat should, in
theory, replicate the session between its instances and so when
failover occur the user continue working ahead and wont get to the
login-page.

Below is just part of the catalina log file :

This is happening on both instances, so both instances are
registering each other.

Apr 18, 2007 11:37:28 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:eek:rg.apache.catalina.tribes.membership.MemberImpl[tcp://
************:4000,*********,4000, alive=1016,id={105 123 -127 -35 -124
78 75 -67 -91 40 -51 70 97 63 -125 94 }, payload={}, command={},
domain={}, ]
Apr 18, 2007 11:37:31 AM
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor
report
INFO: ThroughputInterceptor Report[
Tx Msg:1 messages
Sent:0.00 MB (total)
Sent:0.00 MB (application)
Time:0.05 seconds
Tx Speed:0.01 MB/sec (total)
TxSpeed:0.01 MB/sec (application)
Error Msg:0
Rx Msg:2 messages
Rx Speed:0.00 MB/sec (since 1st msg)
Received:0.00 MB]

if I shutdown once instance the other instance will throw the below
error and I assume this is because this tomcat instance can't
replicate to faulty member:

Apr 18, 2007 11:42:05 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:eek:rg.apache.catalina.tribes.membership.MemberImpl[tcp://
**********:4000,***********,4000, alive=277438,id={105 123 -127 -35
-124 78 75 -67 -91 40 -51 70 97 63 -125 94 }, payload={}, command={66
65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
Apr 18, 2007 11:42:10 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
send
SEVERE: Unable to send message through cluster sender.
org.apache.catalina.tribes.ChannelException: No destination given; No
faulty members identified.
at
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:
194)
at
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:
175)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java:
810)
at
org.apache.catalina.ha.tcp.SimpleTcpCluster.sendClusterDomain(SimpleTcpCluster.java:
789)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.sendSessionIDClusterBackup(JvmRouteBinderValve.java:
391)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.changeSessionID(JvmRouteBinderValve.java:
362)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.handleJvmRoute(JvmRouteBinderValve.java:
319)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.handlePossibleTurnover(JvmRouteBinderValve.java:
229)
at
org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:
206)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
216)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:
190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:
283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
697)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:686)
at java.lang.Thread.run(Thread.java:595)



Would you please let me if you ran into similar issue.

Side note: my webapp does have <distributable/> in its web.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top