Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1652

zookeeper java client does a reverse dns lookup when connecting

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.4.5
    • Fix Version/s: None
    • Component/s: java client
    • Labels:
      None

      Description

      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()

                  setName(getName().replaceAll("\\(.*\\)",
                          "(" + addr.getHostName() + ":" + addr.getPort() + ")"));
                  try {
                      zooKeeperSaslClient = new ZooKeeperSaslClient("zookeeper/"+addr.getHostName());
                  } catch (LoginException e) {
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sbridges Sean Bridges
                Reporter:
                sgbridges Sean Bridges
              • Votes:
                1 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: