You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/08/18 07:39:55 UTC

[GitHub] [shardingsphere-elasticjob] CalvinKirs commented on pull request #1382: [Improvement][common]get the ip configured by hostname first

CalvinKirs commented on pull request #1382:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1382#issuecomment-675313616


   Thank you very much for your answers, I can think my thinking is not comprehensive enough.  I will sort out the problem later.  Then close it.
   
   
   
   
   | |
   ACM_China
   |
   |
   邮箱:acm_china@yeah.net
   |
   
   Signature is customized by Netease Mail Master
   
   On 08/18/2020 13:12, Tboy wrote:
   
   On the face of it, InetAddress.getLocalHost() should give you the IP address of this host. The problem is that a host could have lots of network interfaces, and an interface could be bound to more than one IP address. And to top that, not all IP addresses will be reachable outside of your machine or LAN. For example, they could be IP addresses for virtual network devices, private network IP addresses, and so on.
   What this means is that the IP address returned by InetAddress.getLocalHost() might not be the right one to use.
   
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.


----------------------------------------------------------------
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:
users@infra.apache.org