You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by János Löbb <ja...@yale.edu> on 2008/09/26 22:54:46 UTC

clustering on different machines

Hi,

I posted it earlier, but received no answers, so I try again.

I have apache2 2.2.9, mod_jk 1.2.26, and Tomcat 6.0.18 running on my  
Mac with OSX 10.5.6.  Its domain name is bml0087.yalepath.org.  On my  
Windows 2000 machines I have tomcat 6.0.16 and its domain name is  
bml0039.yalepath.org.

On the mac I have 3 nodes, on the Windows machine I have one.  In the  
mac I start the three up with 10 seconds pause in between.  I can see  
from the logs, that all 4 found each other and participate in the  
cluster.

I use the SessionsExample.  On the Mac the three nodes replicating the  
session to each other, but nothing goes to the Windows machine.  On  
the Mac the failover is working, but again the one on the Mac that  
should fail over to the tomcat instance on the Windows machine does  
not fail over.

Here is the workers.properties file from /usr/local/apache2/conf on  
the Mac:
<snip>
worker.list = lb,jkstatus

worker.lb.type=lb
worker.lb.balance_workers=node1,node2,node3,node4

worker.jkstatus.type=status

worker.node1.type = ajp13
worker.node1.host = localhost
worker.node1.port = 8009
worker.node1.lbfactor = 1
worker.node1.redirect=node2
worker.node2.type = ajp13
worker.node2.host = localhost
worker.node2.port = 8109
worker.node2.lbfactor = 1
worker.node2.redirect=node3
worker.node3.type = ajp13
worker.node3.host = localhost
worker.node3.port = 8209
worker.node3.lbfactor = 1
worker.node3.redirect=node4
worker.node4.type = ajp13
worker.node4.host = bml0039.yalepath.org
worker.node4.port = 8309
worker.node4.lbfactor = 1
worker.node4.redirect=node1

worker.node1.sticky_session = True
worker.node2.sticky_session = True
worker.node3.sticky_session = True
worker.node4.sticky_session = True

worker.node1.sticky_session_force = False
worker.node2.sticky_session_force = False
worker.node3.sticky_session_force = False
worker.node4.sticky_session_force = False
</snip


here is the relevant portion of of the server.xml from one of the Mac  
nodes:
<snip>
     <Engine name="Catalina" defaultHost="localhost" jvmRoute="node1">

       <Cluster  
className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

	<Context path="" docBase="ROOT"  
className="org.apache.catalina.ha.context.ReplicatedContext"/>

       <!-- This Realm uses the UserDatabase configured in the global  
JNDI
            resources under the key "UserDatabase".  Any edits
            that are performed against this UserDatabase are immediately
            available for use by the Realm.  -->
       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
              resourceName="UserDatabase"/>

       <Host name="localhost"  appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false">

       </Host>
     </Engine>

</snip>


Here is the similar server.xml portion from the Windows machine:
<snip>
     <Engine name="Catalina" defaultHost="localhost" jvmRoute="node4">

       <Cluster  
className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
              resourceName="UserDatabase"/>
	<Context path="" docbase="ROOT"  
classname="org.apache.catalina.ha.context.ReplicatedContext"/>

       <Host name="localhost"  appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false"/>
       <Host name="bml0087.yalepath.org"  appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false"/>
     </Engine>

</snip


What am I doing wrong ?

Thanks ahead,

János
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org