tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Session replication problem
Date Thu, 29 Nov 2007 16:51:13 GMT
you can turn debug on and see the messages being sent back and forth.
a previous user reported that sessions got expired during a normal 
shutdown, I yet have to investigate this

Filip

Giancarlo Frison wrote:
> Hi all,
>
> I have a cluster configured with 2 tomcat instaces in the same host and
> apache + mod_jk as load balancer with stiky session.
> The instances' server.xml (show below) diff only for
> /Cluster/Channel/Receiver[port] attribute, the first one set to 4000 and
> the second one set to 4001.
> The 2 instances seem aware each other at the startup as report by the
> log of clone1 (listening on port 4000):
>
> Nov 29, 2007 10:57:43 AM org.apache.coyote.ajp.AjpAprProtocol start
> INFO: Starting Coyote AJP/1.3 on ajp-8009
> Nov 29, 2007 10:57:43 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 4364 ms
> Nov 29, 2007 10:58:03 AM org.apache.catalina.tribes.io.BufferPool
> getBufferPool
> INFO: Created a buffer pool with max size:104857600 bytes of
> type:org.apache.catalina.tribes.io.BufferPool15Impl
> Nov 29, 2007 10:58:04 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
> memberAdded
> INFO: Replication member
> added:org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost.localdomain:4001,localhost.localdomain,4001,
> alive=1009,id={31 -16 121 -113 112 30 72 -34 -128 51 27 -12 115 7 -107
> -22 }, payload={}, command={}, domain={}, ]
>
>
> To test the session replication I've created a session on clone2
> afterwards I shutted down such instance, as reported by clone1 catalina.out:
>
> Nov 29, 2007 11:00:47 AM
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
> memberDisappeared
> INFO: Verification complete. Member
> disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost.localdomain:4001,localhost.localdomain,4001,
> alive=164497,id={31 -16 121 -113 112 30 72 -34 -128 51 27 -12 115 7 -107
> -22 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)},
> domain={}, ]]
> Nov 29, 2007 11:00:47 AM org.apache.catalina.ha.tcp.SimpleTcpCluster
> memberDisappeared
> INFO: Received member
> disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://localhost.localdomain:4001,localhost.localdomain,4001,
> alive=164497,id={31 -16 121 -113 112 30 72 -34 -128 51 27 -12 115 7 -107
> -22 }, payload={}, command={66 65 66 89 45 65 76 69 88 ...(9)}, domain={}, ]
>
> With clone2 failover the mod_jk dispatch the request to the clone1. I've
> expected to find in the clone1 the session, instead request.getSession()
> == false.
>
> The cluster configuration follow stiky session rule, the load balancer
> works fine, everything ok except for session replication.
> Any clue on these cases?
>
> Thanks a lot!
>
> -- worker.properties:
>
> worker.list=lbworker
> worker.lbworker.type=lb
> worker.lbworker.balance_workers=c1,c2
> worker.c1.type=ajp13
> worker.c1.host=localhost
> worker.c1.port=8009
> worker.c2.type=ajp13
> worker.c2.host=localhost
> worker.c2.port=8010
>
> -- server.xml
>
> <Cluster channelSendOptions="8"   
> className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
>         <Manager
> className="org.apache.catalina.ha.session.DeltaManager"      
> expireSessionsOnShutdown="false"           
> notifyListenersOnReplication="true" />
>         <Channel       
> className="org.apache.catalina.tribes.group.GroupChannel">
>                 <Membership
> className="org.apache.catalina.tribes.membership.McastService"   
> address="228.0.0.4"    port="45564"     frequency="500"     
> dropTime="3000"/>
>                 <Receiver address="localhost" autoBind="100"      
> className="org.apache.catalina.tribes.transport.nio.NioReceiver"    
> maxThreads="6" port="4000" selectorTimeout="5000" />
>                 <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>                         <Transport     
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" />
>                 </Sender>
>                 <Interceptor   
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
> />
>                 <Interceptor   
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"
> />
>                 <Interceptor
> className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>         </Channel>
>         <Valve
> className="org.apache.catalina.ha.tcp.ReplicationValve"     filter="" />
>         <Valve
> className="org.apache.catalina.ha.session.JvmRouteBinderValve" />
>         <ClusterListener       
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"
> />
>         <ClusterListener       
> className="org.apache.catalina.ha.session.ClusterSessionListener" />
> </Cluster>
>
>
>
> Giancarlo Frison
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message