Connect to Hive with authenticatation by kerberos

One Star

Connect to Hive with authenticatation by kerberos

Hello,
I try to connect to hive with authenticatation used kerberos, but I get this error:
I use TalendDataIntegration 6.2.1 and try to connect to Distribution: HortonWorks with authentication by Kerberos.
: org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
: org.apache.thrift.transport.TSaslTransport - SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(Unknown Source)
at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:185)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:156)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at zod.thadoop_0_1.tHadoop.tHiveConnection_2Process(tHadoop.java:760)
at zod.thadoop_0_1.tHadoop.tJava_1Process(tHadoop.java:535)
at zod.thadoop_0_1.tHadoop.tSetKerberosConfiguration_1Process(tHadoop.java:419)
at zod.thadoop_0_1.tHadoop.runJobInTOS(tHadoop.java:1103)
at zod.thadoop_0_1.tHadoop.main(tHadoop.java:937)
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Unknown Source)
at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Unknown Source)
at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Unknown Source)
at sun.security.jgss.GSSManagerImpl.getMechanismContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
... 20 more
: zod.thadoop_0_1.tHadoop - tHiveConnection_2 Could not open client transport with JDBC Uri: jdbc:hive2://santaclaus.linux.rz.db.de:10000/default;principal=hive/santaclaus.linux.rz.db.de@EXAMPLE.COM: GSS initiate failed
Exception in component tHiveConnection_2
java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://santaclaus.linux.rz.db.de:10000/default;principal=hive/santaclaus.linux.rz.db.de@EXAMPLE.COM: GSS initiate failed
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:210)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:156)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at zod.thadoop_0_1.tHadoop.tHiveConnection_2Process(tHadoop.java:760)
at zod.thadoop_0_1.tHadoop.tJava_1Process(tHadoop.java:535)
at zod.thadoop_0_1.tHadoop.tSetKerberosConfiguration_1Process(tHadoop.java:419)
at zod.thadoop_0_1.tHadoop.runJobInTOS(tHadoop.java:1103)
at zod.thadoop_0_1.tHadoop.main(tHadoop.java:937)
Caused by: org.apache.thrift.transport.TTransportException: GSS initiate failed
at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
836 milliseconds
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:185)
... 9 more
disconnected



Do you have a advise for me?
Moderator

Re: Connect to Hive with authenticatation by kerberos

Hi,
Which Hadoop distribution you are connecting to? Could you please post your hive component(thiveconnection) setting screenshots on forum? Have you already checked component reference about:TalendHelpCenter:tHiveConnection?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.