From 5e82a5eef6e526c156f36f656afdba13bda8a2a4 Mon Sep 17 00:00:00 2001 From: Ian Luo Date: Mon, 11 Jun 2018 13:50:51 +0800 Subject: [PATCH] #1431: here is a StackOverflow bug? dubbo version 2.5.9, FailsafeLogger.appendContextMessage() > NetUtils.getLocalAddress() (#1912) --- .../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 59edd484e2c..44ca3bc0815 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; }