you running into this?
https://issues.apache.org/bugzilla/show_bug.cgi?id=47308

On 11/13/2009 03:42 PM, Mate1 Subscription wrote:
Hi,

I have been trying to configure clustering between 2 instances of Tomcat on
the same physical server.  Unfortunately it is not working.  Would someone
be able to help me to figure out what is the problem (assuming it is
possible to cluster 2 instances of tomcat on the same server)?

Here is my setup:

SETUP 1: (This Setup is working)
----------------
Server 1 -->  Has one instance of Tomcat
Server 2 -->  Has one instance of Tomcat

All those servers have exactly the same configuration files ... The only
thing that is different between them is each server.xml file has its own IP
address of each server (xxx.yyy.zzz.[11-12]) and its own jvmroute
(server[1-2])

Here is a sample config in server.xml

     <Engine name="Catalina" defaultHost="localhost" jvmRoute="server1">

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

         <Manager className="org.apache.catalina.ha.session.DeltaManager"
             expireSessionsOnShutdown="false"
             notifyListenersOnReplication="true"/>

         <Channel className="org.apache.catalina.tribes.group.GroupChannel">
             <Membership
className="org.apache.catalina.tribes.membership.McastService"
                 address="228.0.0.4"
                 port="45664"
                 frequency="500"
                 dropTime="3000"/>
             <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                 address="xxx.yyy.zzz.11"
                 port="4001"
                 autoBind="100"
                 selectorTimeout="5000"
                 maxThreads="6"/>


Clustering is working perfectly in that setup.  So this is not my problem.


SETUP 2: (This Setup is not working)
--------------
Server 11 -->  Has 2 instances of Tomcat

Here is a sample configuration in server.xml

FIRST INSTANCE

<Engine name="Catalina" defaultHost="localhost" jvmRoute="server11a">

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

         <Manager className="org.apache.catalina.ha.session.DeltaManager"
             expireSessionsOnShutdown="false"
             notifyListenersOnReplication="true"/>

         <Channel className="org.apache.catalina.tribes.group.GroupChannel">
             <Membership
className="org.apache.catalina.tribes.membership.McastService"
                 address="228.0.0.4"
                 port="45674"
                 frequency="500"
                 dropTime="3000"/>
             <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                 address="xxx.yyy.zzz.21"
                 port="4001"
                 autoBind="100"
                 selectorTimeout="5000"
                 maxThreads="6"/>

SECOND INSTANCE

<Engine name="Catalina" defaultHost="localhost" jvmRoute="server11b">

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

         <Manager className="org.apache.catalina.ha.session.DeltaManager"
             expireSessionsOnShutdown="false"
             notifyListenersOnReplication="true"/>

         <Channel className="org.apache.catalina.tribes.group.GroupChannel">
             <Membership
className="org.apache.catalina.tribes.membership.McastService"
                 address="228.0.0.4"
                 port="45674"
                 frequency="500"
                 dropTime="3000"/>
             <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                 address="xxx.yyy.zzz.21"
                 port="4002"
                 autoBind="100"
                 selectorTimeout="5000"
                 maxThreads="6"/>

When I try to start those 2 instances, they start with no problem except
that clustering is not working at all.
If I change the port from 45674 to 45664, Both tomcat instances start and
they are able to cluster with the remaining 2 servers (listed in SETUP 1).
Server11a clusters with Server1&  Server 2
Server11b clusters with Server1&  Server 2
Server11a cannot have a direct cluster link with Server11b (and vice
versa).  But as seen from the last 2 lines, they are in the cluster via
either Server1 or Server2

Why those 2 instances are able to cluster properly when they are using the
same port as Server1&  Server2 ... But when we try to cluster them between
each others, they do not cluster at all?

Thanks for your help.

Richard



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to