Skip to main content
hadoopranger
Gold ⭐️⭐️
May 9, 2024
Solved

Hive connection failed while connecting using jdbc url

I am getting the below error while connecting to hive using jdbc url

Caused by: com.cloudera.hiveserver2.support.exceptions.GeneralException: [Cloudera][HiveJDBCDriver](500171) Error occurred Connecting to ZooKeeper: At: <my_host>:2181/hiveserver2
With Error Message: KeeperErrorCode = AuthFailed for /hiveserver2.

JDBC URL:jdbc:hive2://zk=<my_host>:2181/hiveserver2,<my_host>:2181/hiveserver2;SSL=1;SSLTrustStore=/trustore_path/cm-auto-global_truststore.jks;SSLTrustStorePwd=My_pwd;AuthMech=1;KrbRealm=MYREAL.ORG.COM;KrbHostFQDN=_HOST;KrbServiceName=hive;LogPath=/tmp/log

hadoopranger
Gold ⭐️⭐️
May 24, 2024

Was a Kerberos issue this is resolved

5 replies

DianaTorres
Community Manager
Community Manager
May 9, 2024

@hadoopranger Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Hive experts @cravani @james_jones who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
ChethanYM
Gold ⭐️
Gold ⭐️
May 15, 2024

@hadoopranger 

1. Verify if the JDBC connection string is valid and correct.

2. Try to use the latest JDBC driver version that is available.

3. Check the HS2 servers that you are connecting are accepting the connections and in good health.

4. Check if beeline is working or not.

5. If all correct enable the JDBC driver trace level logging and get the more details on the error.

https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-15/Cloudera-JDBC-Driver-for-Apache-Hive-Install-Guide.pdf

 

Regards,

Chethan YM

Translate
DianaTorres
Community Manager
Community Manager
May 23, 2024

@hadoopranger Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  Thanks.

Translate
Regards, Diana Torres, Senior Community Moderator
smruti
Gold ⭐️⭐️⭐️
Gold ⭐️⭐️⭐️
May 24, 2024

@hadoopranger Make sure that [1] Hive namespace "hiveserver2" is correct, [2] You have a valid kerberos ticket in the client machine. 

Translate
hadoopranger
hadooprangerAuthorAnswer
Gold ⭐️⭐️
May 24, 2024

Was a Kerberos issue this is resolved

Translate