You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rod Fitzsimmons Frey <rf...@psychometrics.com> on 2005/04/27 21:09:25 UTC
Clustering troubles.
I'm setting up a 2-node Tomcat cluster with jk_mod doing the
loadbalancing. The loadbalancing went without a hitch, or at least
without hitches that maillist archives couldn't untie. But now I'd like
to have in-memory session replication between the two tomcat nodes. I
uncommented the cluster element in the server.xml file on each node, but
clustering didn't "magically" happen as I hoped it would: no replication
takes place.
I'm using a page in the jsp-examples webapp that sets a simple attribute
on the session -- session.setAttribute("hello", "howdy");
When starting up Tomcat on each node, I get these log entries:
Apr 27, 2005 12:30:28 PM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager at /jsp-examples
Apr 27, 2005 12:30:28 PM
org.apache.catalina.cluster.session.DeltaManager start
INFO: Manager [/jsp-examples]: skipping state transfer. No members
active in cluster group.
I get this on both nodes, even if I start one node, create a session,
then start node 2.
Multicast is enabled: at least, when I ping 224.0.0.1, I get responses
from all my interfaces. Do I need to do something to join 228.0.0.4, or
is that a programmatic thing?
I've pasted my workers.properties below (minus comments), and the
cluster element from my server.xml. I've tried adding a "name"
attribute to the cluster element and to each of its child elements in
turn, without effect.
TIA!
Rod
# workers.properties -
workers.java_home=/usr/java/jre1.5.0_02
ps=/
#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#
worker.list=realserver1, realserver2, realserver3, realserver4,
loadbalancer, jkstatus
worker.realserver1.port=8009
worker.realserver1.host=localhost
worker.realserver1.type=ajp13
worker.realserver1.lbfactor=100
worker.realserver2.port=8010
worker.realserver2.host=localhost
worker.realserver2.type=ajp13
worker.realserver2.lbfactor=100
worker.realserver3.port=8009
worker.realserver3.host=marmot
worker.realserver3.type=ajp13
worker.realserver3.lbfactor=100
worker.realserver4.port=8010
worker.realserver4.host=marmot
worker.realserver4.type=ajp13
worker.realserver4.lbfactor=100
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=realserver1, realserver2,
realserver3, realserver4
worker.jkstatus.type=status
# end workers.properties
<!-- server.xml <cluster> element -->
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
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="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Clustering troubles.
Posted by Rod Fitzsimmons Frey <rf...@psychometrics.com>.
Forgot to mention: Java runtime is jre1.5.0_02
Rod Fitzsimmons Frey wrote:
> I'm setting up a 2-node Tomcat cluster with jk_mod doing the
> loadbalancing. The loadbalancing went without a hitch, or at least
> without hitches that maillist archives couldn't untie. But now I'd
> like to have in-memory session replication between the two tomcat
> nodes. I uncommented the cluster element in the server.xml file on
> each node, but clustering didn't "magically" happen as I hoped it
> would: no replication takes place.
> ... etc
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org