I am trying to get a horizontal and vertical cluster working. There are
three servers with two instances on Tomcat on each one. The six Tomcat
instances are to share session data amongst themselves. The vertical
clustering works fine. I can log into the app on a server and if I stay
on that server, the session is replicated.
But, as soon as I go to another server, the session is lost and I have
to re login.
I see in the catalina.out that all the Tomcat instances are added:
NFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.9.100.2:4025,catalina,10.9.100.2,4025,
alive=3]
There is an entry for each Tomcat that will be in the cluster.
I can't find any problem with how things are setup, but obviously there
is a problem. Here are the server.xml from two separate Tomcat's on
separate servers. If someone in the know can take a look and let me
know if there is a problem, that would be great. The servers can see
each other and communication is happening.
++++++++++++++++++++++++++++++++++++++++++++++++++++++
server.xml from Tomcat4 on server1:
<Server port="14005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="14080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="14443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="14009"
enableLookups="false" redirectPort="14443"
protocol="AJP/1.3" />
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm14">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="false"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="10.9.100.1"
tcpListenPort="4014"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"
waitForAck="true"/>
<Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
</Cluster>
<Context path="" docBase="app" debug="0">
</Context>
<Context path="/app" docBase="app" debug="0">
</Context>
</Host>
</Engine>
</Service>
</Server>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
server.xml from Tomcat5 on server2:
<Server port="25005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="25080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="25443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="25009" enableLookups="false" redirectPort="25443"
protocol="AJP/1.3" />
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm25">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="false"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="10.9.100.2"
tcpListenPort="4025"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"
waitForAck="true"/>
<Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
</Cluster>
<Context path="" docBase="app" debug="0">
</Context>
<Context path="/app" docBase="app" debug="0">
</Context>
</Host>
</Engine>
</Service>
</Server>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--
++++++++++++++++++++++++++++++++++
Troy Davidson
Java Programmer
PC/Web Team
CMC/Flex
8520 South Sandy Parkway
Sandy, UT 84070
(801) 365-5000
www.cmcflex.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]