hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <>
Subject hiveserver2 using PAM for user authentication failed
Date Wed, 24 Jun 2015 05:08:32 GMT
Hi,      I followed the instructions in the link below to configure hivesever2 using PAM
without success:
(1) download the JPAM native library

(2) unzip and copy and JPam-1.1.jar to a directory (/usr/lib/pam) on the system.

(3) add the following entries in /etc/profile.d/ 

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pam   export HADOOP_OPTS=-Djava.library.path=/usr/lib/pam
  export HADOOP_CLIENT_OPTS=-Djava.library.path=/usr/lib/pam  and add the hive-site property:
hive.aux.jars.path=/usr/lib/pam/JPam-1.1.jar using Ambari
Without step (3), hive-server2 will fail with ClassNotFoundException/UnsatisfiedLinkedError.

(4) set the following configurations in hive-site.xml:
hive.server2.authentication: sshd.
(5) restart hive services via Ambari
(6) create an unix user fay with password 1qaz!QAZ
 My hive test case failed with the authentication error:
Exception in thread "main" java.sql.SQLException: Could not open client transport with JDBC
Uri: jdbc:hive2://localhost:10000/default;user=fay;password=1qaz!QAZ: Peer indicated failure:
Error validating the login
        at org.apache.hive.jdbc.HiveConnection.openTransport(
        at org.apache.hive.jdbc.HiveConnection.<init>(
        at org.apache.hive.jdbc.HiveDriver.connect(
        at java.sql.DriverManager.getConnection(
        at java.sql.DriverManager.getConnection(
        at test.TestHive3.main(
Caused by: org.apache.thrift.transport.TTransportException: Peer indicated failure: Error
validating the login
        at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(
        at org.apache.hive.jdbc.HiveConnection.openTransport(
 Any help is highly appreciated!

View raw message