sijie commented on issue #451: Error in downstream projects due to loopback 
address choosen by default event if not allowed and non-loopback address 
available
URL: https://github.com/apache/bookkeeper/issues/451#issuecomment-323427354
 
 
   ```
       /**
        * Get the IPAddress of the local host as a string.
        * This will be a loop back value if the local host address cannot be
        * determined.
        * If the loopback address of "localhost" does not resolve, then the 
system's
        * network is in such a state that nothing is going to work. A message is
        * logged at the error level and a null pointer returned, a pointer
        * which will trigger failures later on the application
        *
        * @return the IPAddress of the local host or null for a serious problem.
        */
       private static String resolveLocalHostIPAddress() {
           String address;
           try {
               address = InetAddress.getLocalHost().getHostAddress();
           } catch (UnknownHostException e) {
               LOG.warn("Unable to determine address of the host"
                       + "-falling back to \"" + LOCALHOST + "\" address", e);
               try {
                   address = InetAddress.getByName(LOCALHOST).getHostAddress();
               } catch (UnknownHostException noLocalHostAddressException) {
                   //at this point, deep trouble
                   LOG.error("Unable to determine local loopback address "
                           + "of \"" + LOCALHOST + "\" " +
                           "-this system's network configuration is 
unsupported", e);
                   address = null;
               }
           }
           return address;
       }
   ```
   
   just fyi, if you address of local host can't be identified, it will use 
`localhost`. so please check your logs to see if you encountered this log 
statements.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to