Created 07-03-2018 12:13 PM
Hi all,
I have HDP2.6 running. I've configured Hiveserver2 authentication to use PAM. I've set hive.server2.authentication.pam.services=passwd.
When I use beeline to connect to hive instance, hive-server2.err shows the following stacktrace:
Exception in thread "HiveServer2-Handler-Pool: Thread-118" java.lang.NoClassDefFoundError: Could not initialize class net.sf.jpam.Pam at org.apache.hive.service.auth.PamAuthenticationProviderImpl.Authenticate(PamAuthenticationProviderImpl.java:43) at org.apache.hive.service.auth.PlainSaslHelper$PlainServerCallbackHandler.handle(PlainSaslHelper.java:106) at org.apache.hive.service.auth.PlainSaslServer.evaluateResponse(PlainSaslServer.java:102) 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:269) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
I've checked hive log (hiveserver2.log) and upon startup, I could see that jpam-1.1.jar is specified in the classpath.
Is there something I'm missing?
Thanks.
Created 07-03-2018 04:37 PM
Please review the following article and validate your PAM configuration: https://community.hortonworks.com/content/supportkb/48753/how-to-use-pam-for-hiveserver2-authenticat...
Also verify if your passwd file has correct permission and is in correct format.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 07-05-2018 05:24 AM
Thanks for the link to the KB. I've performed all the steps listed in the KB article except for running hive server process as root/super user. Is there an article on how I can achieve that?
Having said, I've restarted hive server and tried to login via beeline. The same exception is still being thrown. Not sure if the jpam JAR file or the libjpam.so file is being loaded correctly.
Thanks.
Created 07-05-2018 06:29 PM
Don't run it as root, that should not be required. Are you using Ambari to manage the cluster? If yes make sure you do all this changes thru ambari ui.
HTH