-
1. Re: MulticastDetector crashes my network
yt.nash May 7, 2008 9:39 AM (in response to yt.nash)I have developed a CustomMulticastDetector in order to solve my problem.
Debugging JBoss Remoting code, I have seen that MulticastDetector has implemented a listener behavior without time delay [ while(running) { ... } // running = true ].
My CustomMulticastDetector introduces this missing delay (using Timer and TimerTask) and it doesn't run! My client detects when some server has been launched, but not when has got down!
Is fast-multicast necessary for correct operation?
Thanks again! -
2. Re: MulticastDetector crashes my network
ron_sigal Jun 3, 2008 6:15 PM (in response to yt.nash)I've created a JIRA issue to look into this problem: http://jira.jboss.com/jira/browse/JBREM-991 "Investigate MulticastDetector message flood".
As I noted, there is some odd looking behavior in MulticastDetector.listen():else { // for now, assume anything *not* of type Detection // is a prompt to send out detection msg heartbeat(); }
As long as you're playing with the MulticastDetector, you might want to comment out this clause and see what happens. -
3. Re: MulticastDetector crashes my network
ron_sigal Aug 5, 2008 12:25 AM (in response to yt.nash)Hi Santiago,
I think I see what is happening. As I commented in JBREM-991,
It seems that the problem is a combination of
1) the fact that listen() calls heartbeat() upon receiving something other than a Detection, and
2) the fact that when heartbeat() creates a null Detection (due to the fact that there are no servers running in the JVM), it sends an empty packet.
So heartbeat() sends a null Detection, listen() receives it and calls heartbeat(), which sends out a Detection, etc. The problem is that, even though the timing of heartbeat() running in the Heartbeat TimerTask is regulated, listen() is not - it responds immediately upon reading something from the multicast socket, and the response can include a call to heartbeat.
MulticastDetector.heartbeat() has been changed so that if it creates a null Detection, it just returns instead of sending it.
If you want to test my fix, it's just the insertion of two lines in org.jboss.remoting.detection.multicast.MulticastDetector.heartbeat()if(socket != null) { Detection msg = createDetection(); if (msg == null) // <== inserted return; // <== inserted ...
-Ron -
4. Re: MulticastDetector crashes my network
yt.nash Aug 5, 2008 3:26 AM (in response to yt.nash)Thank you for your response Ron!
In order to solve this problem I fixed the flooding commenting the else clause inside org.jboss.remoting.detection.multicast.MulticastDetector.listen(). I undestand that your way to fixing the bug is better than my solution!
Thanks again! -
5. Re: MulticastDetector crashes my network
ron_sigal Aug 5, 2008 2:23 PM (in response to yt.nash)
I fixed the flooding
Great. I'm glad you solved the problem and moved on. :-)
Thanks for telling me about the problem.