Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10793

AuthFailed as a valid zookeeper state

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.96.0
    • 0.96.2, 0.98.1, 0.99.0
    • Zookeeper
    • None
    • Reviewed

    Description

      In kerberos mode, Zookeeper accepts SASL authentication. The AuthFailed message indicates the client could not be authenticated, but it should proceed anyway, because only access to znodes that require SASL authentication will be denied and this client may never need to access them. Furthermore, AuthFailed is a valid event supported by Zookeeper, and following are valid Zookeeper events:

      case 0: return KeeperState.Disconnected;
      case 3: return KeeperState.SyncConnected;
      case 4: return KeeperState.AuthFailed;
      case 5: return KeeperState.ConnectedReadOnly;
      case 6: return KeeperState.SaslAuthenticated;
      case -112: return KeeperState.Expired;

      Based on above, ZooKeeperWatcher should not throw exception for AuthFailed event as an invalid event. For this kind of event, Zookeeper already logs it as a warning and proceed with non-SASL connection.

      IllegalStateException from ZookeeperWatcher
      hbase(main):006:0> list
      TABLE                                                                                                                                                                                                       
      14/01/23 17:26:11 ERROR zookeeper.ClientCnxn: Error while calling watcher
      java.lang.IllegalStateException: Received event is not valid: AuthFailed
          at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:410)
          at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:319)
          at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:519)
          at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:495)
      BIMonitoring                                                                                                                                                                                                
      BIMonitoringSummary                                                                                                                                                                                         
      BIMonitoringSummary180                                                                                                                                                                                      
      BIMonitoringSummary900                                                                                                                                                                                      
      LogMetadata                                                                                                                                                                                                 
      LogRecords                                                                                                                                                                                                  
      Mtable                                                                                                                                                                                                      
      t1                                                                                                                                                                                                          
      t2                                                                                                                                                                                                          
      9 row(s) in 0.4040 seconds
      
      => ["BIMonitoring", "BIMonitoringSummary", "BIMonitoringSummary180", "BIMonitoringSummary900", "LogMetadata", "LogRecords", "Mtable", "t1", "t2"]
      
      

      the patch will be similar as HBase-8757

      Attachments

        1. HBASE-10793-trunk-v0.patch
          0.6 kB
          Demai Ni

        Activity

          People

            nidmhbase Demai Ni
            nidmhbase Demai Ni
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: