You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Giancarlo Frison <fr...@nimbuzz.com> on 2007/11/29 11:04:24 UTC
Session replication problem
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
Re: Session replication problem
Posted by Giancarlo Frison <fr...@nimbuzz.com>.
Hi all,
This is the catalina.out. I read the post about session expiration
during shutdown, so I tried to kill -9 the process to avoid any
unexpected behavior but the outcome is the same, no session replication.
What I may do? I appreciate any suggestion. Thanks!
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Dec 5, 2007 2:23:16 PM org.apache.catalina.ha.tcp.SimpleTcpCluster start
INFO: Cluster is about to start
Dec 5, 2007 2:23:16 PM org.apache.catalina.tribes.transport.ReceiverBase
bind
INFO: Receiver Server Socket bound to:/10.228.111.40:4001
Dec 5, 2007 2:23:16 PM
org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
INFO: Setting cluster mcast soTimeout to 500
Dec 5, 2007 2:23:16 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:4
Dec 5, 2007 2:23:16 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://lnxp-1429.srv.mediaways.net:4000,lnxp-1429.srv.mediaways.net,4000,
alive=10573,id={110 72 2 -26 77 55 67 103 -75 -105 19 43 29 72 -12 -46
}, payload={}, command={}, domain={}, ]
Dec 5, 2007 2:23:17 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:4
Dec 5, 2007 2:23:17 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Sleeping for 1000 milliseconds to establish cluster membership,
start level:8
Dec 5, 2007 2:23:17 PM 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
Dec 5, 2007 2:23:18 PM
org.apache.catalina.tribes.membership.McastServiceImpl waitForMembers
INFO: Done sleeping, membership established, start level:8
Dec 5, 2007 2:23:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webx.war
Dec 5, 2007 2:23:18 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
registerManager
WARNING: Manager [ org.apache.catalina.session.StandardManager@3e018c74]
does not implement ClusterManager, addition to cluster has been aborted.
log4j:WARN No such property [datePattern] in
org.apache.log4j.RollingFileAppender.
pack: com.nimbuzz.webx.response
Dec 5, 2007 2:23:20 PM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 5, 2007 2:23:20 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Dec 5, 2007 2:23:20 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4353 ms
Dec 5, 2007 2:25:53 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://lnxp-1429.srv.mediaways.net:4000,lnxp-1429.srv.mediaways.net,4000,
alive=164207,id={110 72 2 -26 77 55 67 103 -75 -105 19 43 29 72 -12 -46
}, payload={}, command={}, domain={}, ]] message. Will verify.
Dec 5, 2007 2:25:53 PM
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
memberDisappeared
INFO: Verification complete. Member
disappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://lnxp-1429.srv.mediaways.net:4000,lnxp-1429.srv.mediaways.net,4000,
alive=164207,id={110 72 2 -26 77 55 67 103 -75 -105 19 43 29 72 -12 -46
}, payload={}, command={}, domain={}, ]]
Dec 5, 2007 2:25:53 PM org.apache.catalina.ha.tcp.SimpleTcpCluster
memberDisappeared
INFO: Received member
disappeared:org.apache.catalina.tribes.membership.MemberImpl[tcp://lnxp-1429.srv.mediaways.net:4000,lnxp-1429.srv.mediaways.net,4000,
alive=164207,id={110 72 2 -26 77 55 67 103 -75 -105 19 43 29 72 -12 -46
}, payload={}, command={}, domain={}, ]
Filip Hanik - Dev Lists ha scritto:
> 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
>
>
--
Giancarlo Frison
Developer
Nimbuzz B.V.
E-mail. giancarlo@nimbuzz.com <ma...@nimbuzz.com>
Nimbuzz IM. giancarlof
Call me <http://www.pushcall.com/client/?key=giancarlo>
---------------------------------------------------------------------
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
Re: Session replication problem
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
excellent, yes, you are overriding the clustering manager if you define
one yourself
thanks for reporting back!
Filip
Giancarlo Frison wrote:
> The problem reported below was due to a misconfiguration.
> In the past I disabled the session persistence uncommenting the manager
> row in context.xml :
> <Manager pathname="" />
>
> After session persistance's activation (commenting the row above)
> session replication works as expected.
>
> Giancarlo Frison
>
> Filip Hanik - Dev Lists ha scritto:
>
>> 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
>>
>>
>>
>
>
> <http://www.pushcall.com/client/?key=giancarlo>
>
>
> ---------------------------------------------------------------------
> 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
Re: Session replication problem
Posted by Giancarlo Frison <fr...@nimbuzz.com>.
The problem reported below was due to a misconfiguration.
In the past I disabled the session persistence uncommenting the manager
row in context.xml :
<Manager pathname="" />
After session persistance's activation (commenting the row above)
session replication works as expected.
Giancarlo Frison
Filip Hanik - Dev Lists ha scritto:
> 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
>
>
<http://www.pushcall.com/client/?key=giancarlo>
---------------------------------------------------------------------
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
Re: Session replication problem
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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