debug log failure to find local host
This commit is contained in:
parent
f4a36a2d87
commit
bb9bcf6a1e
|
@ -108,7 +108,10 @@ public class NetworkService extends AbstractComponent {
|
||||||
if (address == null) {
|
if (address == null) {
|
||||||
address = NetworkUtils.getFirstNonLoopbackAddress(NetworkUtils.getIpStackType());
|
address = NetworkUtils.getFirstNonLoopbackAddress(NetworkUtils.getIpStackType());
|
||||||
if (address == null) {
|
if (address == null) {
|
||||||
return NetworkUtils.getLocalAddress();
|
address = NetworkUtils.getLocalAddress();
|
||||||
|
if (address == null) {
|
||||||
|
return NetworkUtils.getLocalhost(NetworkUtils.StackType.IPv4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public abstract class NetworkUtils {
|
||||||
try {
|
try {
|
||||||
localAddressX = InetAddress.getLocalHost();
|
localAddressX = InetAddress.getLocalHost();
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
logger.warn("Failed to find local host", e);
|
logger.trace("Failed to find local host", e);
|
||||||
}
|
}
|
||||||
localAddress = localAddressX;
|
localAddress = localAddressX;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue