From f2e77f8abba6a64a08008ff1b829fe8cfba3e5cf Mon Sep 17 00:00:00 2001 From: beiwei30 Date: Mon, 11 Jun 2018 11:04:40 +0800 Subject: [PATCH] #1431: here is a StackOverflow bug? dubbo version 2.5.9, FailsafeLogger.appendContextMessage() > NetUtils.getLocalAddress() --- .../java/com/alibaba/dubbo/common/utils/NetUtils.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java index de62059dfc6..7b8bb534c63 100644 --- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java +++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java @@ -190,7 +190,7 @@ private static InetAddress getLocalAddress0() { return localAddress; } } catch (Throwable e) { - logger.warn("Failed to retrieving ip address, " + e.getMessage(), e); + logger.warn(e); } try { Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); @@ -207,19 +207,18 @@ private static InetAddress getLocalAddress0() { return address; } } catch (Throwable e) { - logger.warn("Failed to retrieving ip address, " + e.getMessage(), e); + logger.warn(e); } } } } catch (Throwable e) { - logger.warn("Failed to retrieving ip address, " + e.getMessage(), e); + logger.warn(e); } } } } catch (Throwable e) { - logger.warn("Failed to retrieving ip address, " + e.getMessage(), e); + logger.warn(e); } - logger.error("Could not get local host ip address, will use 127.0.0.1 instead."); return localAddress; }