You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Luca Gervasi <to...@ashetic.net> on 2010/07/14 08:42:30 UTC

How can i verify clusterization?

Hallo,

i'm using (mostly):
Tomcat: 2.0.26
JDK: jdk1.6.0_18

I have clusters of 2-4 tomcats. Is there a way to verify that the
cluster is working? I can see no message exchange. is there a way (even
some jsp code) to ensure that the cluster is working and the number of
nodes joining it?

Furthermore...is there some debugging tool to see the cluster status?

Thanks a lot.

Luca



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


Re: How can i verify clusterization?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luca,

On 7/19/2010 3:07 AM, Luca Gervasi wrote:
> I use httpd + mod_jk as frontend to load balance among all the backends
> (lb worker).

Okay, that will simplify switching backends at will from a client.

> The backends use the BackupManager to achieve clusterization enclosed
> in the <Engine> tag.

Ok. Have you tried DeltaManager (the default)?

>> Also, make sure that you have logging.properties set up in a sane way,
>> and that you can get debugging output from at least one component.
> 
> I don't have a logging.properties file. All the settings are "default".

Those two statements are not compatible: Tomcat ships with a
conf/logging.properties file. Have you disabled it?

At the very least, you ought to be able to force your way into a backend
server with a URL like this:

http://host/context;jsessionid=ABCDEF.node1

(where "node1" is your jvmRoute set in your mod_jk configuration and in
your <Connector> on the backend).

Once you've created a session on one node and stuffed some interesting
things into it, then switch nodes by changing your URL:

http://host/context;jsessionid=ABCDEF.node2

If your session still works, then the cluster is working. If your
session isn't there, or the expected attributes are not present, they
there is either a misconfiguration or some kind of connectivity issue.

Speaking of configuration, would you care to post your cluster
configuration?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxEWnoACgkQ9CaO5/Lv0PCorQCfcETrdSZ9acf4nkrSWqeDR4dY
miEAnjMDhhoIG7csHu0xQKTm8Q06eQsj
=ggnZ
-----END PGP SIGNATURE-----

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


Re: How can i verify clusterization?

Posted by Luca Gervasi <to...@ashetic.net>.
On Fri, 2010-07-16 at 15:56 -0400, Christopher Schultz wrote: 
> Luca,
> 
> On 7/14/2010 2:42 AM, Luca Gervasi wrote:
> > i'm using (mostly):
> 
> What does "(mostly)" mean? You have environments that sometimes deviate
> from this configuration? Sometimes you use another Tomcat and/or JDK
> just for fun?

With "mostly" i mean i handle several cluster rangeing from 5.x to
6.0.28. I'm interested in the 6.0.x trunk cluster capabilities and
handling (since are the one that i handle on my own). 

> > Tomcat: 2.0.26
> 
> No, you're not. Maybe 6.0.26?

Yes, my bad :) Tomcat 6.0.26.

> JDK: jdk1.6.0_18
> 
> Ok.
> 
> > I have clusters of 2-4 tomcats. Is there a way to verify that the
> > cluster is working?
> 
> What do you define as a "cluster"? Are you just load-balancing between
> machines that aren't tied to each other in any way? Are you attempting
> to use distributable sessions?
> What component is "clusterizing" these machines? Do you have an lb out
> front, or Apache httpd + mod_jk/mod_proxy? These details are useful in
> helping you.

I use httpd + mod_jk as frontend to load balance among all the backends
(lb worker). The backends use the BackupManager to achieve
clusterization enclosed in the <Engine> tag.

> > I can see no message exchange. is there a way (even
> > some jsp code) to ensure that the cluster is working and the number of
> > nodes joining it?
> 
> You may be able to verify that sessions are being distributed properly
> by modifying your own JSESSIONID cookie (or simply running with cookies
> disabled and then manually changing the 'jsessionid' parameter in the
> URL in order to force connection to a particular backend. Again, this
> depends entirely upon your lb strategy (which we don't know).
> 
> > Furthermore...is there some debugging tool to see the cluster status?
> 
> Logs certainly help. How about providing your startup log from catalina.out?

My Logs are strange. After a (successfull?) startup, i start getting some errors that seems indicating a bad
clustering behavior:

----[ Successfull startup? This ip is other node's - this is a two nodes cluster ]----
Jul 19, 2010 8:48:41 AM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{172, 16, 35, 3}:8830,{172, 16, 35, 3},8830, alive=1040,id={55 -95 -24 -5 -91 -45 65 79 -93 18 68 -18 -30 84 -96 76 }, payload={}, command={}, domain={}, ]

----[ Strange errors ]----
Jul 19, 2010 8:47:33 AM org.apache.catalina.tribes.tipis.AbstractReplicatedMap heartbeat
SEVERE: Unable to send AbstractReplicatedMap.ping message
org.apache.catalina.tribes.ChannelException: Sender not connected.; No faulty members identified.
        at org.apache.catalina.tribes.transport.nio.PooledParallelSender.sendMessage(PooledParallelSender.java:45)
        at org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:81)
        at org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
        at org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor.sendMessage(ThroughputInterceptor.java:61)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
        at org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
        at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216)
        at org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175)
        at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89)
        at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.ping(AbstractReplicatedMap.java:253)
        at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.heartbeat(AbstractReplicatedMap.java:794)
        at org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:158)
        at org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)

All this continues to be outputted unless i restart my nodes some _random_ times (I keep each istance down at least 1 hearthbeat long).
That's why i need to know if they are really "clustering". Is the errors suppressed because they "works" or 
because they "ultimately decided not to work at all" and just gave up? 


> Also, make sure that you have logging.properties set up in a sane way,
> and that you can get debugging output from at least one component.

I don't have a logging.properties file. All the settings are "default".

Thanks very much for answering my question.

Luca Gervasi



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


Re: How can i verify clusterization?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luca,

On 7/14/2010 2:42 AM, Luca Gervasi wrote:
> i'm using (mostly):

What does "(mostly)" mean? You have environments that sometimes deviate
from this configuration? Sometimes you use another Tomcat and/or JDK
just for fun?

> Tomcat: 2.0.26

No, you're not. Maybe 6.0.26?

> JDK: jdk1.6.0_18

Ok.

> I have clusters of 2-4 tomcats. Is there a way to verify that the
> cluster is working?

What do you define as a "cluster"? Are you just load-balancing between
machines that aren't tied to each other in any way? Are you attempting
to use distributable sessions?

What component is "clusterizing" these machines? Do you have an lb out
front, or Apache httpd + mod_jk/mod_proxy? These details are useful in
helping you.

> I can see no message exchange. is there a way (even
> some jsp code) to ensure that the cluster is working and the number of
> nodes joining it?

You may be able to verify that sessions are being distributed properly
by modifying your own JSESSIONID cookie (or simply running with cookies
disabled and then manually changing the 'jsessionid' parameter in the
URL in order to force connection to a particular backend. Again, this
depends entirely upon your lb strategy (which we don't know).

> Furthermore...is there some debugging tool to see the cluster status?

Logs certainly help. How about providing your startup log from catalina.out?

Also, make sure that you have logging.properties set up in a sane way,
and that you can get debugging output from at least one component.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxAuV8ACgkQ9CaO5/Lv0PBOnQCcCaOcC9gmtmixIUFYAzVCYvUy
3u4AnjsorOZJbbZEO4GGFKshOr94q7JH
=Qobh
-----END PGP SIGNATURE-----

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