Thanks a ton for reaching me out and i really appreciate your help. I am
new to Tomcat clustering, if my questions doesn't make any sense, please
forgive me :)

On 12/26/14 12:36 PM, Arun Kumar wrote:
> I have two Tomcat 7.0  installed on two different machines and
> edited the server.xml file on both the machines with the code
> below, i am not sure if the Tomcats are clustered.

Which exact version of Tomcat 7.0?

I have Tomcat 7.0.32 installed on both the machines.

> I tried to turn of one Tomcat manually to check if the clustering
> is implemented or not. But the failover doesn't work.

Are you expecting that your sessions will be available to any node, or
are you using sticky sessions? The term "cluster" usually indicates
that you want distributable sessions that will be available on any
cluster node, but I just wanted to confirm that's what you want.

*Two things*

First i wanted to test if the first tomcat fails the second Tomcat has to
start. I was not testing the session sticky session in the first scenario.

Secondly i want to implement Sticky session. I guess Apache (mod_jk) has to
be implemented in front of the Tomcat servers for sticky session. We have a
hardware load balancer appliance, can we use this hardware load balancer
for load balancing without installing Apache (mod_jk). I don't have the
details of the hardware appliance that load balances the Tomcats. (My
Manager is on leave, so i have to wait until he returns)

If you can afford to have users re-login and re-start a workflow when
a node fails, using session-stickiness without any formal "clustering"
is a much easier configuration and will yield higher performance from
the whole setup.

What is the process if the users can afford re-login and restart a workflow
?Could you please guide me how to implement it. Does the code which i sent
will be helpful for this scenario.

Anyway...

> Please let me know how to confirm if the servers are clustered or
> not. Appreciate your help.
>
> <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.TcpFailureDetector"/>
>
>
<Interceptor
>
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>
>
<Interceptor
>
className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>
>
</Channel>
>
> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
>
>
filter=".*\.gif|.*\.js|.*\.jpeg|.*\.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>

When you say "failover doesn't work" do you mean that you don't get
sent to another back-end server, or do you mean that when you get to
that alternate server, your session isn't there?

Failover in my opinion is, if the first Tomcat fails the second server has
to start and the application should be available to the users without any
downtime. Sticky session was not part of my failover testing.

My first question is: do you have <distributable/> set in your
web.xml? That's the easiest thing to overlook because it's not in
server.xml and will silently prevent your sessions from being
distributed to the rest of the cluster.

No, i haven't edited the web.xml file with the <distributable/> set, the
"Tomcat - How to cluster" web page has that information, but they don't
clearly explain the procedure where to add it in the web.xml file. Do i
need to just add "<distributable/>" parameter at the end by opening it in
the notepad. Please let me know.


Regards !!
Arun Chanda

On Sat, Dec 27, 2014 at 11:05 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Arun,
>
> On 12/26/14 12:36 PM, Arun Kumar wrote:
> > I have two Tomcat 7.0  installed on two different machines and
> > edited the server.xml file on both the machines with the code
> > below, i am not sure if the Tomcats are clustered.
>
> Which exact version of Tomcat 7.0?
>
> > I tried to turn of one Tomcat manually to check if the clustering
> > is implemented or not. But the failover doesn't work.
>
> Are you expecting that your sessions will be available to any node, or
> are you using sticky sessions? The term "cluster" usually indicates
> that you want distributable sessions that will be available on any
> cluster node, but I just wanted to confirm that's what you want.
>
> If you can afford to have users re-login and re-start a workflow when
> a node fails, using session-stickiness without any formal "clustering"
> is a much easier configuration and will yield higher performance from
> the whole setup.
>
> Anyway...
>
> > Please let me know how to confirm if the servers are clustered or
> > not. Appreciate your help.
> >
> > <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.TcpFailureDetector"/>
> >
> >
> <Interceptor
> >
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
> >
> >
> <Interceptor
> >
> className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
> >
> >
> </Channel>
> >
> > <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
> >
> >
> filter=".*\.gif|.*\.js|.*\.jpeg|.*\.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>
>
> When you say "failover doesn't work" do you mean that you don't get
> sent to another back-end server, or do you mean that when you get to
> that alternate server, your session isn't there?
>
> My first question is: do you have <distributable/> set in your
> web.xml? That's the easiest thing to overlook because it's not in
> server.xml and will silently prevent your sessions from being
> distributed to the rest of the cluster.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUntiuAAoJEBzwKT+lPKRYZPsP/0WLFhAbn/ASUbGSoXDhxs99
> TMVs3Y7+UcacuosSpSldT2NLqY5qUMdGtJY6UUl4LVQ2NPdZ9bgak8MJCgl0IsnK
> r7bld1KrlDp47O/7gt9lEqqvPZ93jWBE3/CNdCPX8dHaAXx5NnDHlJsxKc/va1G4
> H5b5pMc0GAzkhGCdEe0f0+cTQ8FXKfF83jUPmjhNCkyPsh352zIPo0yhkxBh4LOm
> UCakw54k1YtGxcpSQlc5NuCEtHTq+rKZQPTAL2q8pYfxZe4kqbPFGF+mY+BCkmLR
> ndSmZdY+FIWx1lvRd3QmPziPdvxQETrCveDf7GlUZz2qTgNtOItlz5me0bDG4Zfx
> B4xf6qD7LfKoUtV/FSjj6nsT8AXIfJy2sVC0JY9sWWxqDmvoPa+0M1Fat8UlGq0m
> c2wNuHSdAjnAr+OUS2rKAXUkp/Qe1xbK8/XvjhplPUauN0pjU3o9FsToMrpT1teP
> llXOxF6G6cPr4QEpfGVv1QP7e+PapOnX1IFR1hVqcJPYYAcuzTtZpCf/j1lJJKIO
> S7PDj8W0AeKyLoBxWvOk+tzTQpQ32YPMg0joVpA8NmZxONedXc09AOKmV/SabgXY
> GJMTXyLxGrAM0k6nzfSyXyPI/QsSqLOdeyb8Br1FZxj2Ec1ybuuNMhhBFa/yVF10
> GZR36ISkSFpcXZzHzahw
> =AlDX
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to