Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 88636 invoked from network); 8 Oct 2008 19:10:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2008 19:10:19 -0000 Received: (qmail 46650 invoked by uid 500); 8 Oct 2008 19:10:06 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46626 invoked by uid 500); 8 Oct 2008 19:10:06 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 46615 invoked by uid 99); 8 Oct 2008 19:10:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 12:10:06 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 19:09:02 +0000 Received: (qmail 18210 invoked from network); 8 Oct 2008 14:09:36 -0500 Received: from unknown (HELO ?172.20.144.74?) (209.150.75.114) by halosg.com with SMTP; 8 Oct 2008 14:09:36 -0500 Message-ID: <48ED0551.5060707@hanik.com> Date: Wed, 08 Oct 2008 12:09:05 -0700 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Basic Tribes Questions References: <21bb29220809290739m69057be9l5442bd53fa9bb1c9@mail.gmail.com> <48E51292.7020808@christopherschultz.net> <21bb29220810030513tc65a46p1161f1ce465a8618@mail.gmail.com> <48E6302D.6080506@christopherschultz.net> <67E22B6D074F864DA33A325B9A6F226B0DCEBA87@OTWATMX02.opentext.net> <48E669AD.7010905@hanik.com> <67E22B6D074F864DA33A325B9A6F226B0DD592E1@OTWATMX02.opentext.net> <48EA2E9C.7010408@hanik.com> <67E22B6D074F864DA33A325B9A6F226B0DDD3BAD@OTWATMX02.opentext.net> <48EBD0DF.7010906@hanik.com> <67E22B6D074F864DA33A325B9A6F226B0DE3B517@OTWATMX02.opentext.net> In-Reply-To: <67E22B6D074F864DA33A325B9A6F226B0DE3B517@OTWATMX02.opentext.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org catalina-tribes.jar it depends on tomcat-juli.jar both of them are in the binary distribution for Tomcat Filip Mike Wannamaker wrote: > Cool, > > Is there a repository to just get the tribes jar or just the tribes source without having to get all of tomcat to get it? > > Like a SVN or CVS repository I could get the fix from and build myself? > > Thanks > Mike > > -----Original Message----- > From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com] > Sent: October 7, 2008 5:13 PM > To: Tomcat Users List > Subject: Re: Basic Tribes Questions > > hi Mike, that's great. yes, the TCP failure detector could give multiple > "DISAPPEARED" messages, that is something I'm about to fix > > Filip > > Mike Wannamaker wrote: > >> Hi Filip, >> >> I think I am seeing the message, it was just hidden amongst other log messages I guess I missed it. >> >> However I do see something else when I added the TcpFailureDetector to the interceptor list, I see two DISAPPEARED messages? >> >> Without TcpFailureDetector: >> >> 1) Start Server #1, then #2 >> 2) Unplug #2 network >> 3) On #1 - #2 DISAPPEARED, on #2 - #1 DISAPPEARED >> 4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 ADDED >> >> Add TcpFailureDetector >> >> 1) Start Server #1, #2 >> 2) Unplug #2 network >> 3) On #1 - #2 DISAPPEARED;#2 DISAPPEARED, on #2 - #1 DISAPPEARED;#1 DISAPPEARED >> 4) Reconnect #2 to network, on #1 - #2 SHUTDOWN;#2 ADDED, on #2 - #1 ADDED >> >> I take it I get the 2 DISAPPEARED messages because I have another interceptor, but is this the correct behaviour? >> >> TIA >> Mike >> >> >> >> -----Original Message----- >> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com] >> Sent: October 6, 2008 11:28 AM >> To: Tomcat Users List >> Subject: Re: Basic Tribes Questions >> >> there are getters and setters for everything >> and they are all documented here >> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html >> >> each component has getters/setters, for example, the multicast address >> >> setAddress >> getAddress >> >> breakpoints might not work very well, since you are stopping one thread, >> and not really emulating a real scenario. >> >> again, sounds like you have a simple test case, if you can share that, I >> can get more understanding, and help you further. >> >> Filip >> >> Mike Wannamaker wrote: >> >> >>> Hi Filip >>> >>> Thanks for the info. However, I don't see the documentation for the setters/getters you mention below? >>> Also I'm having issues while debugging. When I hit a breakpoint in my code and while stepping thru code, I get DISAPPEARED/ADDED messages over and over on the other server? I would think the heartbeat is running in a separate thread for both send/receive? How to solve this, bump the heartbeat timeout? >>> >>> TIA >>> Mike >>> >>> -----Original Message----- >>> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com] >>> Sent: October 3, 2008 2:51 PM >>> To: Tomcat Users List >>> Subject: Re: Basic Tribes Questions >>> >>> answers inline >>> >>> Mike Wannamaker wrote: >>> >>> >>> >>>> 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: >>>> >>>> >>>> >>>> >>> no need to use any properties, there are getters and setters for everything >>> and they are all documented here >>> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-channel.html >>> >>> >>> >>>> _tribesChannel.getMembershipService().getProperties().put("mcastPort", String.valueOf(_mainPort)); >>>> _tribesChannel.getMembershipService().getProperties().put("mcastAddress", _multicastIPAddr); >>>> >>>> >>>> >>>> >>> not sure what you are trying to do in the code below. if you wanna set >>> the port, then simply do it. >>> the membership will pick it up automatically >>> >>> >>> >>>> 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? >>>> >>>> >>>> >>>> >>> the message you are getting is cause the membership tries to recover. >>> you can limit this, by doing >>> setRecoveryEnabled(true|false); >>> setRecoveryCounter(nr-of-times-to-try-recover) >>> >>> also, you haven't added in the TCP failure detector, which adds one more >>> layer of protection >>> see it in this default configuration >>> http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html >>> >>> you should still get the member disappeared error (eventually after the >>> timeout), if you can supply a simple test case, I can try it out over here. >>> >>> best >>> Filip >>> >>> >>> >>> >>>> 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 >>>> >>>> >>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >>> >>> >>> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org