You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Willem Fibbe - Realworks BV <wi...@realworks.nl> on 2013/07/29 13:27:50 UTC

Tomcat cluster problems regarding multicast

Hi,

We have a Tomcat Cluster consisting of 2 servers that replicate their sessions with the following
configuration in server.xml (directly under <Engine..>):

	...
	<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
	    <Channel className="org.apache.catalina.tribes.group.GroupChannel">
	        <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.7" port="42223" />
	    </Channel>
	</Cluster>
	...

When I do a 'tcpdump host 228.0.0.7' on both servers, I see the following:
	on server1:
		...
		<timestamp> IP server1.42223 > 228.0.0.7.42223: UDP, length 69
		<timestamp> IP server1.42223 > 228.0.0.7.42223: UDP, length 69
		<timestamp> IP server1.42223 > 228.0.0.7.42223: UDP, length 69
		...

	on server2:
		...
		<timestamp> IP server2.42223 > 228.0.0.7.42223: UDP, length 69
		<timestamp> IP server2.42223 > 228.0.0.7.42223: UDP, length 69
		<timestamp> IP server2.42223 > 228.0.0.7.42223: UDP, length 69
		...

The strange thing is that when I restart one server, the other server keeps showing the same tcpdump-output,
but the restarting server sees both servers for a few minutes and after a while only itself again.
Thankfully this means the membership is established and sessions are correctly replicated between the 2 nodes,
but still, this situation signals a problem.

It should be noted that both servers are virtual machines on different (Proxmox) hosts.

We have several Tomcat Clusters in our network of which some show similar problems.
However, some time ago one cluster consisting of 2 dedicated servers (i.e. no virtual machines) showed a similar problem.
After we modified the multicast-address to a unique one (228.0.0.X), it seemed to have been fixed.

The fix didn't work in this case though.

I was thinking the problem might be found towards our switches that don't handle multicast well, but then
again, why was the fix on another Tomcat Cluster to adjust the multicast-address? Maybe the problem lies more
towards the fact that these servers are virtual machines.

I'm hoping someone can provide some suggestions to identify the exact problem (and the solution:)).

Regards,
Willem


-- 
Willem Fibbe
Teamleider Systeembeheer
Realworks BV
A: W.G. Plein 516, 1054 SJ Amsterdam
T: +31 20 4 120 120
F: +31 20 4 120 127

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


Re: Tomcat cluster problems regarding multicast

Posted by Mark Thomas <ma...@apache.org>.
On 29/07/2013 12:27, Willem Fibbe - Realworks BV wrote:
> I'm hoping someone can provide some suggestions to identify the exact problem (and the solution:)).

This is one of those things (like SSL) where several things all need to
be lined up or nothing works and debugging it is tricky.

The best I can offer is this test case that I used to debug clustering
not working on OSX [1].  If you enhance this to help in your case feel
free to contribute back any patches you think may be generally useful.

Mark


[1]
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/TesterMulticast.java?view=annotate



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