Tomcat 6 Clustering Issue

Discussion in 'Java' started by laith.canada@gmail.com, Apr 20, 2007.

  1. Guest

    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
     
    , Apr 20, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tito

    Clustering and FrameWork.Net

    Tito, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    376
  2. 1992

    Clustering & Tomcat

    1992, Nov 22, 2003, in forum: Java
    Replies:
    0
    Views:
    360
  3. 1992

    Clustering & Tomcat

    1992, Nov 22, 2003, in forum: Java
    Replies:
    0
    Views:
    383
  4. Matt Rapoport

    Tomcat 5 Clustering

    Matt Rapoport, Dec 22, 2003, in forum: Java
    Replies:
    1
    Views:
    1,738
    Wolfgang Vullhorst
    Dec 23, 2003
  5. Thenu
    Replies:
    0
    Views:
    483
    Thenu
    Oct 6, 2006
Loading...

Share This Page