diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java index 9523fa2575583..f17d869b5039c 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java @@ -54,7 +54,6 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ServerSocket; -import java.net.UnknownHostException; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Collection; @@ -1376,11 +1375,7 @@ public int getPort() { public InetAddress getAddress() { InetAddress bindAddr = serverSocket.getInetAddress(); if (bindAddr.getHostAddress().equals(NetUtils.getWildcardIPAddress())) { - try { - return InetAddress.getLocalHost(); - } catch (UnknownHostException e) { - throw new RuntimeException(e); - } + return InetAddress.getLoopbackAddress(); } return bindAddr; }