liudezhi2098 opened a new pull request #2240: fix the problem that the method 
InetAddress.getLocalHost().getHostAddress() gets ip as 127.0.0.1
URL: https://github.com/apache/bookkeeper/pull/2240
 
 
   
   ### Motivation
   In some cases, Bookie obtained the local IP of 127.0.0.1, which caused an 
abnormal report status.
   get ip method:
   `InetAddress.getLocalHost().getHostAddress();`
   host
   ```
    127.0.0.1   localhost localhost.localdomain localhost4 
localhost4.localdomain4
     ::1         localhost localhost.localdomain localhost6 
localhost6.localdomain6
   ```
   _Although it can be solved by setting up the host, but the customer does not 
necessarily set it when using it, so if you do not rely on this when obtaining 
the IP, it will be much more friendly_
   
   fix the problem that the method InetAddress.getLocalHost().getHostAddress() 
gets ip as 127.0.0.1
   
   
   ### Changes
   
   Added a method to get the local IP in NetUtils, and replaced the other 
places to get the IP
   
   
   
   
   

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


With regards,
Apache Git Services

Reply via email to