Hi,
After reviewing the cluster-howto [1] I have noticed a few bits I have
forgotten to configure.
Namely
# Make sure your web.xml has the <distributable/> element or set at
your <Context distributable="true" />
# Make sure that jvmRoute attribute is set at your Engine <Engine
name="Catalina" jvmRoute="node01" >
[1] http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
On 5/30/07, ben short <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to setup a cluster of two tomcats and use the
Tomcat 1 server.conf
<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="192.168.6.175"
tcpListenPort="4001"
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;"/>
<Deployer
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/home/tomcat/war-temp/"
deployDir="/home/tomcat/war-deploy/"
watchDir="/home/tomcat/war-listen/"
watchEnabled="false"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
</Cluster>
Tomcat 2 server.conf
<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="192.168.6.103"
tcpListenPort="4001"
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;"/>
<Deployer
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/home/tomcat/war-temp/"
deployDir="/home/tomcat/war-deploy/"
watchDir="/home/tomcat/war-listen/"
watchEnabled="false"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
</Cluster>
I configured it so that only tomcat 1 can deploy new webapps via the
FarmWarDeployer mechanism.
When I upload my war to the watchDir i see the following messages in
catalina.log.
INFO: check cluster wars at /home/tomcat/war-listen
30-May-2007 13:07:37
org.apache.catalina.cluster.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[] from /home/tomcat/war-deploy/ROOT.war
30-May-2007 13:07:37 org.apache.catalina.cluster.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app
30-May-2007 13:07:59 org.apache.catalina.cluster.deploy.WarWatcher check
The ROOT.war is in tomcat 1 and tomcat 2 deployDir, but is not in
either tomcats manager app or accessible via the webapps url.
Can anyone give me some help with getting this going?
Regards
Ben Short
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]