Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 2429 by [email protected]: JAIN HA Heartbeat thinks balancer on
127.0.0.1 is unreachable on Windows
http://code.google.com/p/mobicents/issues/detail?id=2429
What steps will reproduce the problem?
1. Start the SIP load balancer on 127.0.0.1
2. Start the application server with default configuration, bind it to
127.0.0.1
3. Make any SIP request to the SLB external port
What is the expected output? What do you see instead?
It is expected that SLB prints a log message about node attached. All
requests made to the SLB should go to the application server.
Instead, SLB returns "500 No nodes available"
What version of the product are you using? On what operating system?
SIP Balancer:
http://mobicents.googlecode.com/svn/tags/tools/sip-balancer/1.2.FINAL
MSS: mss-1.5.0.FINAL-jboss-jdk6-5.1.0.GA
Note that it only reproduces on Windows (I have tried on Windows 7). It
does not reproduce on Linux.
Please provide any additional information below.
The problem is that on Windows (I have tried on several Windows 7 nodes)
platform the following code prints "false":
import java.net.*;
public class Test {
public static void main(String... args) throws Exception {
InetAddress local = InetAddress.getByName("127.0.0.1");
NetworkInterface ni = NetworkInterface.getByInetAddress(local);
System.out.println("Reachable = " + local.isReachable(ni, 5, 100));
}
}
As a result, if JBoss is bound to the 127.0.0.1 and balancer is started on
127.0.0.1 as well,
LoadBalancerHeartBeatingServiceImpl#getReachableSIPNodeInfo returns empty
list. Moreover no error message is shown, making this situation difficult
to debug.
Attached are two patches. One prints warning to the log if list of
reachable nodes is empty. The second patch treats every SIPNode as
reachable if balancer address is loopback address (not ideal, but should be
safe).
Attachments:
0001-Warn-if-balancer-address-is-unreachable-via-every-ne.patch 1.4 KB
0002-Treat-loopback-address-as-always-reachable.patch 1.2 KB