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

ZooKeeper close API does not close Login thread.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.2, 3.6.0
    • Component/s: java client
    • Labels:
      None

      Description

      When kerberos is used as authentication mechanism, one login thread runs in the background for ZooKeeper client as well ZooKeepr server.
      This problem is related to Zookeeper client and the scenario is as follows:

      1. Main application connects to Zookeeper
        ZooKeeper zooKeeper = new ZooKeeper(zookeeperConnectionString, sessionTimeout, this)
        
      2. Completes it is work with zookeeper
      3. calls close() on zookeeper, and continues with rest of the application specific work

      Thread dump, taken after 3rd step, shows that login thread is still alive

      "Thread-1" daemon prio=6 tid=0x04842c00 nid=0x1f04 waiting on condition [0x05b7f000]
         java.lang.Thread.State: TIMED_WAITING (sleeping)
      	at java.lang.Thread.sleep(Native Method)
      	at org.apache.zookeeper.Login$1.run(Login.java:180)
      	at java.lang.Thread.run(Thread.java:722)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arshad.mohammad Mohammad Arshad
                Reporter:
                arshad.mohammad Mohammad Arshad
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: