Ask Your Question
1

Cannot connect to Hive using JDBC Lookup

asked 2017-07-18 21:26:22 -0500

Kranthi Dan gravatar image

Hi Team, I'm getting the below error when I'm using JDBC Lookup to Hive Database.

Error: JDBC_00 - Cannot connect to specified database: com.streamsets.pipeline.api.StageException: JDBC_06 - Failed to initialize connection pool: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization: [Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: [Cloudera][HiveJDBCDriver](500169) Unable to connect to server: Peer indicated failure: GSS initiate failed.

I have added all the jars provided by the Cloudera Driver.

JDBC Connection String : jdbc:hive2://hostname:10000/dbname;AuthMech=1;KrbRealm=*.COM;KrbHostFQDN=.com;KrbServiceName=hive

Please help me out!!!

edit retag flag offensive close merge delete

Comments

Have you enabled Kerberos in SDC itself by configuring the kerberos related properties in sdc.properties?

adam gravatar imageadam ( 2017-07-19 15:35:33 -0500 )edit

Yes, I have enabled the kerberos properties in the cloudera manager. SDC is able to read/write into HDFS, but when I am trying to lookup from Hive, I am getting the above error.

Kranthi Dan gravatar imageKranthi Dan ( 2017-07-19 16:28:11 -0500 )edit

Hello Kranthi. Not sure if you figured a way to do this, but I was wondering if ever came across this - - https://community.cloudera.com/t5/Batch-SQL-Apache-Hive/Kerberos-authentication-with-hive-JDBC-driver/m-p/50072 - discussion during your search.

Mufy gravatar imageMufy ( 2017-09-07 04:06:22 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-09-07 11:51:08 -0500

Kranthi Dan gravatar image

updated 2017-09-20 22:50:10 -0500

metadaddy gravatar image

I was able to connect using LDAP + SSL connection string. jdbc:impala://hostname:21050/dbname;AuthMech=3;UID=username;PWD=password;SSL=1;SSLKeyStore=<keystorepath>;SSLTrustStorePwd=password

edit flag offensive delete link more
0

answered 2017-07-21 11:29:01 -0500

I'm not a Kerberos expert by any means, but I'm pretty sure KrbHostFQDN needs to be the actual fully qualified domain name of the host that HiveServer 2 is running on. Can you try that?

edit flag offensive delete link more

Comments

I am using the fully qualified domain name, but still having the same problem. Able to connect to impala using LDAP + SSL connection string.

Kranthi Dan gravatar imageKranthi Dan ( 2017-07-25 08:35:01 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2017-07-18 21:26:22 -0500

Seen: 1,032 times

Last updated: Sep 20 '17