Help Center/ MapReduce Service/ Troubleshooting/ Using Hive/ "authentication failed" Is Displayed During an Attempt to Connect to the Shell Client
Updated on 2022-09-14 GMT+08:00

"authentication failed" Is Displayed During an Attempt to Connect to the Shell Client

Symptom

In clusters in security mode, the beeline command fails to be executed on the Shell client when the HiveServer service is normal, and the system prompts "authentication failed". The following information is displayed.

Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false 
Acquire TGT from Cache 
Credentials are no longer valid 
Principal is null 
null credentials from Ticket Cache 
[Krb5LoginModule] authentication failed
No password provided

Cause Analysis

  • The client user does not perform security authentication.
  • Kerberos authentication expired.

Solution

  1. Log in to the node where the Hive client is installed.
  2. Run the source Cluster client installation directory/bigdata_env command.

    Run the klist command to check whether there is a valid ticket in the local end. The following information shows that the ticket became valid at 14:11:42 on December 24, 2016, and expired at 14:11:40 on December 25, 2016. In the period of time, the ticket was available.

    klist
    Ticket cache: FILE:/tmp/krb5cc_0
    Default principal: xxx@HADOOP.COM
    Valid starting     Expires            Service principal
    12/24/16 14:11:42  12/25/16 14:11:40  krbtgt/HADOOP.COM@HADOOP.COM

  3. Run the kinit username command for authentication and log in to the client again.