e = NetworkInterface.getNetworkInterfaces();
} catch (SocketException e1) {
_logger.error("Failed to get list of interfaces", e1);
- //throw new RuntimeException("Failed to acquire list of interfaces", e1);
return null;
}
while (e.hasMoreElements()) {
while (ee.hasMoreElements()) {
InetAddress i = (InetAddress) ee.nextElement();
_logger.debug("Trying address {}", i);
- if ((i instanceof Inet4Address) && (i.isSiteLocalAddress())) {
+ if ((i instanceof Inet4Address) && (!i.isLoopbackAddress())) {
String hostAddress = i.getHostAddress();
_logger.debug("Settled on host address {}", hostAddress);
return hostAddress;