Hi, I'm doing some test for an HA solution with Tomcat and run into this problem. <Membership className="org.apache.catalina.cluster.mcast.McastService" mcastAddr="228.0.0.6" mcastBindAddress="onyx.webos2.net" mcastPort="45564" mcastFrequency="500" mcastDropTime="3000"/> When mcastBindAddress is specified and the network card is disabled/Enabled I get ATTENTION: Unable to send mcast message. java.net.BindException: Cannot assign requested address: Datagram send failed at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(Unknown Source) at org.apache.catalina.cluster.mcast.McastServiceImpl.send(McastServiceImpl.java:238) at org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread.run(McastServiceImpl.java:274) 2006-07-13 20:29:00 org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread run ATTENTION: 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(Unknown Source) at org.apache.catalina.cluster.mcast.McastServiceImpl.send(McastServiceImpl.java:238) at org.apache.catalina.cluster.mcast.McastServiceImpl$SenderThread.run(McastServiceImpl.java:274) The problem is that the NoRouteToHost loop forever. If I omit the mcastBindAddress param I will get a NoRouteToHostException and Tomcat will continue correctly when the interface is up again. Best Regards David
When you enable the route again, does it correct itself, or do you require a tomcat restart. I have a feeling that code needs to better self heal itself, but wanted to get your input first. Filip
I've added a fix to Tomcat 6.0 and 6.x (in trunk). Basically, it does attempt a recovery after such a failure. There are still a few issues to work through, one of them being, what should be done to the existing membership, since we are not receiving mcast packets due to a local error, then is it really appropriate to expire members?
I have backport the Filips fix from tomcat 6.0.x. It works for me at my MAC's, but I am not sure that it also work with other OS's. Feedback is very welcome Peter - At my mac (jdk 1.5.0_07) I see some SocketTimeoutException and IOException after send is going wrong. After four failures the kernel create a new multicast route! Strange... After interface is back the old route is recreated.
No feedback so assume Peter's backport did indeed work.