tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Wannamaker" <mwann...@opentext.com>
Subject Basic Tribes Questions
Date Fri, 03 Oct 2008 17:24:13 GMT
Hi, I am currently trying to use Tribes as the clustering layer on our server.

My startup code looks like this.

        if(_tribesChannel == null)
        { // nothing to do if already running
            try
            {
                _tribesChannel = new GroupChannel();
                // must be done before start:
                _tribesChannel.getMembershipService().getProperties().put("mcastPort", String.valueOf(_mainPort));
                _tribesChannel.getMembershipService().getProperties().put("mcastAddress",
_multicastIPAddr);
                if(_ancillaryPort > 0)
                {
                    _tribesChannel.getMembershipService().getProperties().put("tcpListenPort",
String.valueOf(_ancillaryPort));
                    // hack alert: Default Tribes instantiation (Tomcat 6.0.16) does not read
value for "tcpListenPort" from properties.
                    // Therefore, set it directly
                    ChannelReceiver receiver = _tribesChannel.getChannelReceiver();
                    if(receiver.getPort() != _ancillaryPort)
                    {
                        if(receiver instanceof ReceiverBase)
                        {
                            ((ReceiverBase)receiver).setPort(_ancillaryPort);
                        }
                    }
                }

                _tribesChannel.addMembershipListener(_tribesMembershipListener);
                _tribesChannel.addChannelListener(_tribesChannelListener);
                _tribesChannel.start(CHANNEL_COMPONENTS);
            }
            catch(ChannelException ex)
            {
                try { _tribesChannel.stop(CHANNEL_COMPONENTS); } catch(Throwable t) { /*gulp*/}
                _tribesChannel = null;
                throw new RuntimeException(ex); // todo, exception handling?
            }
        }

My Question is that when I start Server #1, then Server #2, then unplug Server #2 network
cable, Server #1 gets the DISAPPEARED message but Server #2 just keeps logging the message
below.  As I write this it's at attempt #120.  How do I get this to notify on Server #2 that
Server #1 has DISAPPEARED or can I set the number of attempts to a maximum number before notifying?

Also is there any other documentation for tribes, other than the limited docs on the apache
site?

	INFO: Done sleeping, membership established, start level:8
	Oct 3, 2008 1:12:44 PM org.apache.catalina.tribes.transport.nio.NioReplicationTask run
	WARNING: IOException in replication worker, unable to drain channel. Probable cause: Keep
alive socket closed[An existing connection was 	forcibly closed by the remote host].
	Oct 3, 2008 1:12:44 PM org.apache.catalina.tribes.membership.McastServiceImpl$SenderThread
run
	WARNING: Unable to send mcast message.
	java.net.NoRouteToHostException: No route to host: Datagram send failed
		at java.net.PlainDatagramSocketImpl.send(Native Method)
		at java.net.DatagramSocket.send(DatagramSocket.java:612)
		at org.apache.catalina.tribes.membership.McastServiceImpl.send(McastServiceImpl.java:385)
		at org.apache.catalina.tribes.membership.McastServiceImpl$SenderThread.run(McastServiceImpl.java:445)
	Oct 3, 2008 1:12:49 PM org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread
run
	INFO: Tribes membership, running recovery thread, multicasting is not functional.
	Oct 3, 2008 1:12:49 PM org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread
stopService
	WARNING: Recovery thread failed to stop membership service.
	java.net.NoRouteToHostException: No route to host: Datagram send failed
		at java.net.PlainDatagramSocketImpl.send(Native Method)
		at java.net.DatagramSocket.send(DatagramSocket.java:612)
		at org.apache.catalina.tribes.membership.McastServiceImpl.send(McastServiceImpl.java:385)
		at org.apache.catalina.tribes.membership.McastServiceImpl.stop(McastServiceImpl.java:299)
		at org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.stopService(McastServiceImpl.java:480)
		at org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.run(McastServiceImpl.java:504)
	Oct 3, 2008 1:12:49 PM org.apache.catalina.tribes.membership.McastServiceImpl setupSocket
	INFO: Setting cluster mcast soTimeout to 500
	Oct 3, 2008 1:12:49 PM org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread
startService
	WARNING: Recovery thread failed to start membership service.
	java.net.SocketException: error setting options
		at java.net.PlainDatagramSocketImpl.join(Native Method)
		at java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:172)
		at java.net.MulticastSocket.joinGroup(MulticastSocket.java:276)
		at org.apache.catalina.tribes.membership.McastServiceImpl.start(McastServiceImpl.java:233)
		at org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.startService(McastServiceImpl.java:490)
		at org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread.run(McastServiceImpl.java:504)
	Oct 3, 2008 1:12:49 PM org.apache.catalina.tribes.membership.McastServiceImpl$RecoveryThread
run
	INFO: Recovery attempt 1 failed, trying again in 5000 seconds
	
Mime
View raw message