You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/06/11 05:50:54 UTC

[GitHub] beiwei30 closed pull request #1912: [Dubbo-1431] here is a StackOverflow bug? dubbo version 2.5.9, FailsafeLogger.appendContextMessage() > NetUtils.getLocalAddress()

beiwei30 closed pull request #1912: [Dubbo-1431] here is a StackOverflow bug? dubbo version 2.5.9, FailsafeLogger.appendContextMessage() > NetUtils.getLocalAddress()
URL: https://github.com/apache/incubator-dubbo/pull/1912
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 de62059dfc..7b8bb534c6 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<NetworkInterface> 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;
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org