Multicasting was ok and the server answered to a "ping 230.0.0.4".
The problem persisted on SuSE Linux 9.1 kernel 2.6.4-52-default, but not on
WinXP.
I had a look in the source org.jboss.ha.jndi.DetachedHANamingService.java,
class AutomaticDiscovery, method start() and found two issues.
The original code:
stopping = false;
| // Use the jndi bind address if there is no discovery address
| if (discoveryBindAddress != null)
| discoveryBindAddress = bindAddress;
| InetSocketAddress bindAddr = new
InetSocketAddress(discoveryBindAddress,
| adGroupPort);
| socket = new MulticastSocket(bindAddr);
| socket.setTimeToLive(autoDiscoveryTTL);
| group = InetAddress.getByName(adGroupAddress);
| socket.joinGroup(group);
|
First, discoveryBindAddress should likely be tested as equal to null. It makes
no sense to set it to bindAddr if one already exists.
Second, there seems to be a bug in the constructor of MulticastSocket when
instantiated with an InetAddress. I changed the code to first instantiate with
a port number and then set the interface in a second call.
Changed code:
stopping = false;
| // Use the jndi bind address if there is no discovery address
| if (discoveryBindAddress == null)
| discoveryBindAddress = bindAddress;
| socket = new MulticastSocket(adGroupPort);
| socket.setInterface(discoveryBindAddress);
| socket.setTimeToLive(autoDiscoveryTTL);
| group = InetAddress.getByName(adGroupAddress);
| socket.joinGroup(group);
|
This code works on the Linux server. I had not the time to test other
platforms. Please check this out.
Mathias
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881560#3881560
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881560
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user