ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Li <david.li...@gmail.com>
Subject Re: TcpDiscoveryVmIpFinder handle IP change
Date Tue, 15 Aug 2017 02:25:09 GMT
Based on your info, I work out a solution as extend from

public synchronized Collection<InetSocketAddress> getRegisteredAddresses() {
    Collection<String> addrs = new LinkedHashSet<>();
    for (InetSocketAddress addr : super.getRegisteredAddresses()) {
    return super.getRegisteredAddresses();

I tested, it works fine. I am just not sure if there is any negative

On Tue, Aug 15, 2017 at 2:40 AM, Nikolai Tikhonov <ntikhonov@apache.org>

> Hi David,
> JVM can cache a name service. Could you try to set
> *networkaddress.cache.ttl* to zero?
> 1. http://www.myhowto.org/java/42-understanding-host-
> name-resolution-and-dns-behavior-in-java
> 2. http://docs.oracle.com/javase/1.5.0/docs/guide/net/properties.html
> On Mon, Aug 14, 2017 at 10:18 AM, David Li <david.li.sg@gmail.com> wrote:
>> Hi all,
>> Currently I am connecting to an ignite server node
>> with TcpDiscoveryVmIpFinder, from a client node, using a domain as
>> hostname, eg. ignite.dev, normally when there is any network issue or
>> server issue, the client node will reconnect automatically when the network
>> restore or ignite server node up again. But it cannot reconnect if the IP
>> address of the server node has changed.
>> I had a look the TcpDiscoveryVmIpFinder class, when setting the address,
>> it resolve the ip string (or hostname) as  InetSocketAddress , I guess
>> when ignite try to reconnect, it directly use the  InetSocketAddress ,
>> will not try to resolve the ip address by the original hostname, so I am
>> thinking maybe I can extend the TcpDiscoveryVmIpFinder, and make it work
>> for my scenario, but I am not very sure about the place to change.
>> Overall, my ignite server node may change its IP address if it up from a
>> failure, and I want my client node can automatically reconnect itself to
>> the server node. Any help are appreciated. Thank you.
>> David
>> 14 Aug

View raw message