Dear Robin,

Thanks very much for your kind help and information provided below. 

Up till now, I copied the following configuration into the server.xml
file of each of the two tomcats. The result is that each tomcat is being
aware of each member added or deleted to/from each tomcat. So, I guess
that the tomcats are communicating well in between them.

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

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->        
        <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
                 channelSendOptions="6">

          <Manager
className="org.apache.catalina.ha.session.BackupManager"
                   expireSessionsOnShutdown="false"
                   notifyListenersOnReplication="true"
                   mapSendOptions="6"/>
          <!--
          <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="45564"
                        frequency="500"
                        dropTime="3000"/>
            <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                      address="auto"
                      port="5000"
                      selectorTimeout="100"
                      maxThreads="6"/>

            <Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
              <Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender
"/>
            </Sender>
            <Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetec
tor"/>
            <Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch
15Interceptor"/>
            <Interceptor
className="org.apache.catalina.tribes.group.interceptors.ThroughputInter
ceptor"/>
          </Channel>

          <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
"/>

          <Deployer
className="org.apache.catalina.ha.deploy.FarmWarDeployer"
                    tempDir="/tmp/war-temp/"
                    deployDir="/tmp/war-deploy/"
                    watchDir="/tmp/war-listen/"
                    watchEnabled="false"/>

          <ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>
        </Cluster>

With regards to your suggestions, what is the difference between
"channelSendOptions" setting to '6' instead of '8'? Also, how did you
setup the configuration so that it will not pick up the loopback
(127.0.0.1) but using the eth0?

Thanks a lot for your kind help provide. Really appreciated.

Regards, 

Josef Pullicino

Systems Administrator

GO
GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827     f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.

-----Original Message-----
From: Robin D. Wilson [mailto:rwils...@gmail.com] 
Sent: 12 March 2010 14:12
To: 'Tomcat Users List'
Subject: RE: How to setup Tomcat Cluster - Help needed

This reference is what we used - it seemed to work fine for us:

        http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Don't forget to add this part:

        <distributable/> 

Into the 'web.xml' file from the ".war" files you want to use clustered
sessions.

In our environment, we have 4 ".war" files with various webapps we
deploy. Only our 'ROOT.war' is "clustered" though. So it is the
only ".war" file with the distributable tag in its web.xml.

Also, we changed a few settings in the 'server.xml' file settings, such
as: 

        1) Changed the "channelSendOptions" setting to '6' instead of
'8'...

        2) Increased some of the timeouts (we have a high-volume
environment, and 4 clustered tomcats)

        3) Removed the 'autobind' and manually set the IP addresses of
the Receiver (it was picking the
                wrong interface - lo0 (127.0.0.1) instead of 'et0'...)

Lastly, you need to change (at least) the port # for the "McastService"
if you are running multiple clusters on the same network.
(For example, all of our developers have their own "personal" clusters -
so each of them uses a different 'port' for their cluster's
multicast messages - this avoids cross-talk between their cluster and
our main environment. Of course, our production environment is
completely isolated from this - but when you are testing multiple
environments, this can be confusing...)

PS. We made adjustments to the DeltaManager and SessionManager code for
some unique session issues we had - because we are using
Tapestry, and it creates a session if there are any 'form' tags on a
page. This meant that our site was creating a session for every
visitor - which sort of overwhelmed the cluster (all sessions are
supposed to be replicated to all cluster members - right?)... So
our adjustments just keep certain sessions from wasting cluster
bandwidth if they are of sufficiently short duration so as not to
warrant replication. The best way to avoid this is to not create
sessions that you don't really want replicated to all members of
the cluster.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-----Original Message-----
From: Josef Pullicino [mailto:josef.pullic...@go.com.mt] 
Sent: Friday, March 12, 2010 3:30 AM
To: Tomcat Users List
Subject: How to setup Tomcat Cluster - Help needed

Dear All,

I would like to setup a tomcat cluster with 2 nodes. The configuration
must be in a horizontal alignment, meaning that the two nodes are going
to reside on two different machines. Any idea of how to set it up since
the default tomcat help guide does not provide any configuration
examples.

Any help would be greatly appreciated.

Thanks for your support,

Regards,

Josef Pullicino

Systems Administrator

GO

 

GO Mobile, Fra Diego Street, Marsa, MRS 1501, Malta.

t  +356 2594 6827     f  +356 2124 0112

w www.go.com.mt

 

This email and any files or content transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. If you are
not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
information is strictly prohibited. The Company and the originator of
this email accept no liability for the content of this email, or for the
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of this information is strictly prohibited.


Warning: Although the Company and the originator  have taken reasonable
precautions to ensure no viruses are present in this email, the company
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.

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


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


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

Reply via email to