[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Duske updated ZOOKEEPER-1846:
----------------------------------
    Attachment: QuorumCnxManager.java
                QuorumPeer.java
                Learner.java

Forces the re-resolve, on error, of the Peers' Hostname to IP address, which is 
an issue in virtual/cloud environments where IPs are assigned dynamically upon 
every container startup.
If the Hostname is unresolvable or the connection fails (IP change), this DNS 
refresh process is immediately triggered.

> Cached InetSocketAddresses prevent proper dynamic DNS resolution
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1846
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1846
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.4.5, 3.4.6
>            Reporter: Benjamin Jaton
>            Priority: Minor
>              Labels: newbie, patch
>         Attachments: Learner.java, QuorumCnxManager.java, QuorumPeer.java
>
>
> The class QuorumPeer maintains a Map<Long, QuorumServer> quorumPeers.
> Each QuorumServer is created with an instance of InetSocketAddress 
> electionAddr, and holds it forever.
> I believe this is why the ZooKeeper servers can't resolve each other 
> dynamically: If a ZooKeeper in the ensemble cannot be resolved at startup, it 
> will never be resolved (until restart of the JVM), constantly failing with an 
> UnknownHostException, even when the node is back up and reachable.
> I would suggest to recreate an InetSocketAddress every time we retry the 
> connection.



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

Reply via email to