Tomcat Session Replication problem

2008-03-20 Thread Mc210274

Hello,

I have a problem with getting session replication to work in tomcat. I have
two tomat servers running on Windows Server 2003. 

I have replication work to the point where the user sessions get replicated
when the tomcat servers startup. What i mean by this is that lets say
tomcat2 is running and a user connects to the application and browses
arround. Then i start tomcat1 and I can see in the session state gets
replicated from tomcat2 to tomcat1.
===
Mar 20, 2008 12:54:18 PM org.apache.catalina.cluster.session.DeltaManager
waitForSendAllSessions
INFO: Manager [/webdav]; session state send at 3/20/08 12:54 PM received in
109 ms.
===

If the user does not perform any additional actions in the application - so
the session state does not change - then I can stop the tomcat service on
tomcat2 and the session will fail over successfully to tomcat1. But I the
user clicks on any other links in the application and the session state
changes and I stop tomcat2 then then the user sees HTTP 500 errors. 

By checking the log file catalina.log file I do not see any session
replications after the initial one when the tomcat server starts. And I
believe that is the problem I just cannot figure out what I am doing wrong.
Below you will find the cluster config of tomcat1 and tomcat2. If anybody
could help me with this problem that would be great:

Tomcat1:
===
Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

manager.className=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=false
 notifySessionListenersOnReplication=true
Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.16.140.1
mcastPort=45564
mcastFrequency=500
mcastDropTime=3/
Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=172.16.140.1
  tcpListenPort=9015
  tcpSelectorTimeout=100
  tcpThreadCount=16/
Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000/
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/ 
ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener /
ClusterListener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener
/
/Cluster
===

Tomcat2
===
Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

manager.className=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=false
 notifySessionListenersOnReplication=true
Membership
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.16.140.1
mcastPort=45564
mcastFrequency=500
mcastDropTime=3/
Receiver
className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=172.16.140.2
  tcpListenPort=9015
  tcpSelectorTimeout=100
  tcpThreadCount=16/
Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000/
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/ 
ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener /
ClusterListener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener
/
/Cluster
===


-- 
View this message in context: 
http://www.nabble.com/Tomcat-Session-Replication-problem-tp16185824p16185824.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new

Re: Tomcat Session Replication problem

2008-03-20 Thread Mc210274

I forgot to state that I am running tomcat 5.5
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Session-Replication-problem-tp16185824p16185828.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat session replication problem

2008-03-12 Thread Vreixo Formoso
Hi!

O Mar, 11-03-2008 ás 22:32 -0600, Filip Hanik - Dev Lists escribiu:
 for it to work you would need to have channelSendOptions=6, 

No, it doesn't work too. I've already tried with it... With synchronous
session replication server response is a bit slower (but too much...)
but I have the same problem...

 however, 
 not using sticky sessions  is a bad strategy, 

I know, but then, what is the reason for supporting them at all?

Cheers,
Vreixo

 no matter how you look at it.
 using sticky sessions, one can take advantage of asynchronous messaging 
 and hence not affect the overall response time
 and other benefits of course
 
 Filip
 Vreixo Formoso wrote:
  Hi!
 
  I've a session replication problem I don't know how to solve. 
 
  I've installed a tomcat cluster with 2 tomcat workers (v6.0.14) and an
  apache server 2.2.3 as load balancer, with mod_jk.
 
  I've configured DeltaManager for session replication. When I use sticky
  sessions, all works propertly, when I stop one tomcat the other one
  handles the session. 
 
  However, if I disable sticky sessions things change. As a first sight,
  it seems to work ok. Each request is processed by a different tomcat,
  sessions are replicated propertly. However, if I send several requests
  too fast (well, not so fast, just clicking F5 in the web browser 1 or 2
  times per second), after a short time the session is suddenly lost, and
  a new session is created. May it be a session replication problem? I've
  tried with several cluster-channelSendOptions but I always have the
  same problem. Note that with sticky sessions in the load balancer the
  problem does not exists. Any ideas? 
 
  Thank you in advance.
 
  Cheers,
  Vreixo Formoso
 
 
  - cluster config in server.xml --
 
  Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
   channelSendOptions=4
 
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
  className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=auto
port=4002
autoBind=100
selectorTimeout=5000
maxThreads=6/
 
  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/
/Channel
 
Valve className=org.apache.catalina.ha.tcp.ReplicationValve
   filter=/
Valve
  className=org.apache.catalina.ha.session.JvmRouteBinderValve/
 
Deployer
  className=org.apache.catalina.ha.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
 
ClusterListener
  className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
ClusterListener
  className=org.apache.catalina.ha.session.ClusterSessionListener/
  /Cluster
 
 
 
 
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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


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



Tomcat session replication problem

2008-03-11 Thread Vreixo Formoso
Hi!

I've a session replication problem I don't know how to solve. 

I've installed a tomcat cluster with 2 tomcat workers (v6.0.14) and an
apache server 2.2.3 as load balancer, with mod_jk.

I've configured DeltaManager for session replication. When I use sticky
sessions, all works propertly, when I stop one tomcat the other one
handles the session. 

However, if I disable sticky sessions things change. As a first sight,
it seems to work ok. Each request is processed by a different tomcat,
sessions are replicated propertly. However, if I send several requests
too fast (well, not so fast, just clicking F5 in the web browser 1 or 2
times per second), after a short time the session is suddenly lost, and
a new session is created. May it be a session replication problem? I've
tried with several cluster-channelSendOptions but I always have the
same problem. Note that with sticky sessions in the load balancer the
problem does not exists. Any ideas? 

Thank you in advance.

Cheers,
Vreixo Formoso


- cluster config in server.xml --

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=4

  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
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=4002
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

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/
  /Channel

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 filter=/
  Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/

  ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
  ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/
/Cluster







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



Re: Tomcat session replication problem

2008-03-11 Thread Filip Hanik - Dev Lists
for it to work you would need to have channelSendOptions=6, however, 
not using sticky sessions  is a bad strategy, no matter how you look at it.
using sticky sessions, one can take advantage of asynchronous messaging 
and hence not affect the overall response time

and other benefits of course

Filip
Vreixo Formoso wrote:

Hi!

I've a session replication problem I don't know how to solve. 


I've installed a tomcat cluster with 2 tomcat workers (v6.0.14) and an
apache server 2.2.3 as load balancer, with mod_jk.

I've configured DeltaManager for session replication. When I use sticky
sessions, all works propertly, when I stop one tomcat the other one
handles the session. 


However, if I disable sticky sessions things change. As a first sight,
it seems to work ok. Each request is processed by a different tomcat,
sessions are replicated propertly. However, if I send several requests
too fast (well, not so fast, just clicking F5 in the web browser 1 or 2
times per second), after a short time the session is suddenly lost, and
a new session is created. May it be a session replication problem? I've
tried with several cluster-channelSendOptions but I always have the
same problem. Note that with sticky sessions in the load balancer the
problem does not exists. Any ideas? 


Thank you in advance.

Cheers,
Vreixo Formoso


- cluster config in server.xml --

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=4

  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
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=4002
  autoBind=100
  selectorTimeout=5000
  maxThreads=6/

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/
  /Channel

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 filter=/
  Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=/tmp/war-temp/
deployDir=/tmp/war-deploy/
watchDir=/tmp/war-listen/
watchEnabled=false/

  ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
  ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/
/Cluster







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



  



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