sebastien diaz created IGNITE-3221:
--------------------------------------

             Summary: Bad ip used , when fixed ip in hostname
                 Key: IGNITE-3221
                 URL: https://issues.apache.org/jira/browse/IGNITE-3221
             Project: Ignite
          Issue Type: Bug
            Reporter: sebastien diaz


Hello

My machine have certainly a bad dns resolve issue (docker+swarm,network and 
compose)  but I fix the ip directly at the place of the hostname.

Unfortunately TcpDiscoveryNode mark a different socker ip

Example host=40.1.0.23 -> socketAddress=104.239.213.7 :
TcpDiscoveryNode [id=54b73d98-e702-4660-957a-61d065003078, addrs=[40.1.0.23], 
sockAddrs=[44de9a1e9afe/104.239.213.7:47500, /40.1.0.23:47500]

The code apparently in casuse should be :
public static InetAddress resolveLocalHost(@Nullable String hostName) throws 
IOException {
    return F.isEmpty(hostName) ?
        // Should default to InetAddress#anyLocalAddress which is 
package-private.
        new InetSocketAddress(0).getAddress() :
        InetAddress.getByName(hostName);
}

In my issue it will preferable to not use the function
InetAddress.getByName 
but to use something as 
InetAddress.getByAddress(ipAddr);

thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to