You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Andrii Rubtsov (JIRA)" <ji...@apache.org> on 2015/07/20 17:54:05 UTC
[jira] [Commented] (ZOOKEEPER-1652) zookeeper java client does a
reverse dns lookup when connecting
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14633725#comment-14633725 ]
Andrii Rubtsov commented on ZOOKEEPER-1652:
-------------------------------------------
I am using 3.4.6 and I still have slow 5 seconds connections.
What about clone ZOOKEEPER-1661? Is it ok that we have this item closed and clone still open?
Debugging shows that root cause is definitely near code shown in item description.
Still not sure what exactly causes the problem in my case.
But! As a quick workaround enlisting all ZK nodes in hosts file definitely helps.
> zookeeper java client does a reverse dns lookup when connecting
> ---------------------------------------------------------------
>
> Key: ZOOKEEPER-1652
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1652
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.4.5
> Reporter: Sean Bridges
> Assignee: Sean Bridges
> Priority: Critical
> Attachments: ZOOKEEPER-1652.patch
>
>
> When connecting to zookeeper, the client does a reverse dns lookup on the hostname. In our environment, the reverse dns lookup takes 5 seconds to fail, causing zookeeper clients to connect slowly.
> The reverse dns lookup occurs in ClientCnx in the calls to adr.getHostName()
> {code}
> setName(getName().replaceAll("\\(.*\\)",
> "(" + addr.getHostName() + ":" + addr.getPort() + ")"));
> try {
> zooKeeperSaslClient = new ZooKeeperSaslClient("zookeeper/"+addr.getHostName());
> } catch (LoginException e) {
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)