Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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
Attachments
Issue Links
- links to