We did the same test with Weblogic and it is able to reconnect after a network failure.
I had a quick look at the code of JGroups and I think that we can override this limit by a minor modification. It is not necessary to recreate a socket in case of the raise of an NoRouteToHostException, we can bind the socket to the interface. I've modified the code to catch the NoRouteToHostException and now my cluster works well and JBoss and reconnect properly.
I've modified the _send method of UDP class like this :
org.jgroups.protocols.UDP._send :
private void _send(InetAddress dest, int port, boolean mcast, byte[] data, int offset, int length) throws Exception {
DatagramPacket packet=new DatagramPacket(data, offset, length, dest, port);
try {
if(mcast) {
if(mcast_send_sockets != null) {
MulticastSocket s;
for(int i=0; i < mcast_send_sockets.length; i++) {
s=mcast_send_sockets[i];
try
// solve reconnection issue with Windows
catch(NoRouteToHostException e)
catch(Exception e)
{ log.error("failed sending packet on socket " + s); } }
}
else { // DEFAULT path
if(mcast_sock != null) {
try
// solve reconnection issue with Windows
catch(NoRouteToHostException e)
}
}
}
else
}
catch(Exception ex)
}
- blocks
-
JBPAPP-5844 Fix NoRouteToHost exception in UDP._send()
- Resolved