  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | tomcat 5 not replicating sessions? | tomcat 5 not replicating sessions? 2004-01-12 - By Apu Shah
Back
i used the backported session clustering in tomcat 4. i am currently in the process of upgrading to tomcat 5.
in my new environment with tomcat 5, i see from the logs that my webapp (/stats) is enabled for session replication (the web.xml has the <distributable /> element):
Jan 12, 2004 5:49:46 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 12, 2004 5:49:46 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.16 Jan 12, 2004 5:49:46 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster  start INFO: Cluster is about to start Jan 12, 2004 5:49:46 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster  start INFO: Sleeping for 2000 secs to establish cluster membership Starting clustering manager...:/stats Jan 12, 2004 5:49:49 PM org.apache.catalina.cluster.session.SimpleTcpReplicationManager log INFO: Starting clustering manager...:/stats [INFO] ManagerBase - -Manager[/stats], skipping state transfer. No members active in cluster group.
i also see that sessions are being persisted:
Jan 12, 2004 5:50:05 PM org.apache.catalina.cluster.session.SimpleTcpReplicationManager log INFO: storing attribute 'org.apache.struts.action.LOCALE' with value 'en_US' Jan 12, 2004 5:50:05 PM org.apache.catalina.cluster.tcp.ReplicationValve  addClusterSendTime INFO: Average cluster serialize/send time=53 ms for 1 requests (53ms).
however i do not see any replication occuring. if i take down this instance, the other instance does not have a copy of the session.
also when the second instance starts up, i get:
[INFO] ManagerBase - -Manager[/stats], skipping state transfer. No members active in cluster group.
here are the settings (server.xml)
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster " name="AppServerCluster" debug="10" printToScreen="true" saveOnRestart="false" maxActiveSessions="-1" minIdleSwap="-1" maxIdelSwap="-1" maxIdelBackup="-1" pathname="null" printSessionInfo="true" checkInterval="10" expireSessionOnShutdown="false" serviceclass="org.apache.catalina.cluster.mcast.McastService " mcastAddr="228.1.2.4" mcastPort="45564" mcastFrequency="500" mcastDropTime="5000" tcpListenAddress="192.168.100.53" tcpListenPort="4001" tcpSelectorTimeout="100" tcpThreadCount="2" tcpKeepAliveTime="-1" synchronousReplication="true" useDirtyFlag="true" /> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve " filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
(identical to those on the other tomcat instance, only change being the ip address)
the machines are dual homed but since i explicitly set the ip addresses, shouldn't they connect to each other?
any ideas would be greatly appreciated. i bumped up logging to 32, but there were still no error messages in the logs. where should i start looking?
i thank you for your guidance. thanks much and sorry for the trouble.
apu
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected) For additional commands, e-mail: tomcat-user-help@(protected)
|
|
 |