Support Questions

Find answers, ask questions, and share your expertise

Hive PAM Authentication Error in hiveserver2.log

avatar
Contributor

All,

I have set up PAM authentication and successfully authenticated with Linux users but I see this error in hiveserver2.log, can someone help with this error.

2017-07-24 03:55:46,111 ERROR [HiveServer2-Handler-Pool: Thread-5643]: transport.TSaslTransport (TSaslTransport.java:open(315)) - SASL negotiation failure
javax.security.sasl.SaslException: Error validating the login [Caused by javax.security.sasl.AuthenticationException: Error authenticating with the PAM service: sshd]
        at org.apache.hive.service.auth.PlainSaslServer.evaluateResponse(PlainSaslServer.java:109)
        at org.apache.thrift.transport.TSaslTransport$SaslParticipant.evaluateChallengeOrResponse(TSaslTransport.java:539)
        at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:283)
        at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
        at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:268)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.security.sasl.AuthenticationException: Error authenticating with the PAM service: sshd
        at org.apache.hive.service.auth.PamAuthenticationProviderImpl.Authenticate(PamAuthenticationProviderImpl.java:46)
        at org.apache.hive.service.auth.PlainSaslHelper$PlainServerCallbackHandler.handle(PlainSaslHelper.java:106)
        at org.apache.hive.service.auth.PlainSaslServer.evaluateResponse(PlainSaslServer.java:102)
        ... 8 more
2017-07-24 03:55:46,112 ERROR [HiveServer2-Handler-Pool: Thread-5643]: server.TThreadPoolServer (TThreadPoolServer.java:run(296)) - Error occurred during proces
sing of message.
java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: Error validating the login
        at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:268)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.thrift.transport.TTransportException: Error validating the login
        at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
        at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
        at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
        at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
        ... 4 more

Though there are no issues with Hive authentication but why I'm getting these errors?

1 REPLY 1

avatar
Explorer

Hi @ramcharantej ,

 

Hadoop needs file read permission to verify login information of a user.

 

Try to change the file permissions to hive user with hadoop group and it should work after.

 

You can use below command for user credential files.

 

sudo chgrp  hive:hadoop  /etc/shadow

 

In your case, additional files like sshd files should also be owned by root.

 

Please let me know if you still face any problem with it.

 

Regards,

Dhirendra