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

handle auth failure in java client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.1
    • 3.3.2, 3.4.0
    • java client
    • None
    • Reviewed

    Description

      ClientCnxn.java currently has the following code:
      if (replyHdr.getXid() == -4) {
      // -2 is the xid for AuthPacket
      // TODO: process AuthPacket here
      if (LOG.isDebugEnabled())

      { LOG.debug("Got auth sessionid:0x" + Long.toHexString(sessionId)); }

      return;
      }

      Auth failures appear to cause the server to disconnect but the client never gets a proper state change or notification that auth has failed, which makes handling this scenario very difficult as it causes the client to go into a loop of sending bad auth, getting disconnected, trying to reconnect, sending bad auth again, over and over.

      Attachments

        1. ZOOKEEPER-844.patch
          4 kB
          Camille Fournier
        2. ZOOKEEPER332-844
          5 kB
          Camille Fournier

        Activity

          People

            fournc Camille Fournier
            fournc Camille Fournier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: