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

zookeeper java client does a reverse dns lookup when connecting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 3.4.5
    • None
    • java client
    • 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

        1. ZOOKEEPER-1652.patch
          0.8 kB
          Sean Bridges

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: