Unable to authenticate to Hbase when using Hue

An HBase feature improvement to the Thrift Server (HBASE-19852) may cause authentication issues between HBase and Hue, and you may see the following error while accessing the HBase tables from Hue: “Failed to authenticate to HBase Thrift Server, check authentication configurations.

You may also see the following error in the Hue logs: “RestException: Unable to authenticate <Response [401]>”. To fix this issue, update the HBase configurations using Cloudera Manager.

  1. Log in to Cloudera Manager as an Administrator.
  2. Go to Clusters > HBase service > Instances and note the hostname of the host on which the HBase Thrift Server is running.
    If multiple Thrift Servers are configured, then find the one that Hue is configured to use.
  3. Go to Configuration > HBase Thrift Server Advanced Configuration Snippet (Safety Valve) for hbase-site.xml and add the following properties:
    Field Property
    Name hbase.thrift.spnego.principal
    Value HTTP/[***HOSTNAME-FROM-STEP2***]@REALM

    Substitute @REALM with the actual Kerberos realm.

    Name hbase.thrift.spnego.keytab.file
    Value hbase.keytab
  4. Select the following options to enable the properties:
    • Enable HBase Thrift Http Server
    • Enable HBase Thrift Proxy Users
  5. Deselect the following options to disable the properties:
    • Enable HBase Thrift Server Compact Protocol
    • Enable HBase Thrift Server Framed Transport
  6. (Optional) If you have not enabled SSL on your cluster, but if you have Kerberized your cluster, then add the following HBase configurations, without which you may encounter a NullPointerException error while starting the HBase Thrift Server:
    1. Add the following properties in the HBase Client Advanced Configuration Snippet (Safety Valve) for hbase-site.xml field:
      Field Property
      Name hbase.thrift.ssl.enabled
      Value false
    2. Add the following properties in the HBase Thrift Server Advanced Configuration Snippet (Safety Valve) for hbase-site.xml field:
      Field Property
      Name hbase.thrift.ssl.enabled
      Value false
  7. Click Save Changes.
  8. Go to Clusters > Hue service > Configuration > Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini and add the following lines:
    [hbase]
    thrift_transport=buffered
  9. Click Save Changes.
  10. Restart the HBase and Hue services to apply stale configurations.