Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ERROR: Connecting to Kerberos Enabled Hive using Beeline Connection String

avatar
New Contributor

Hello,

I am unable to access Hive using Beeline connection string in the edge node. The JDBC String that I am using is as follows:

beeline -u "jdbc:hive2://Example.com:10000/default;principal=hive/Example.com@EXAMPLE.COM"

 

Error:

Unknown HS2 problem when communicating with Thrift server.
Error:jdbc:hive2://Example.com:10000/default;principal=hive/Example.com@EXAMPLE.COM: Invalid status 21 (state=08S01,code=0)

Help is required to fix this issue.

 

Thank you.

 

1 ACCEPTED SOLUTION

avatar
Guru

I see that you are using CDP 7.1.7. Follow below steps if youare using autoTLS

1. Check TrustStore Password:
======
# cat /etc/hive/conf/ssl-client.xml | grep -i -A1 "ssl.client.truststore.password"
<name>ssl.client.truststore.password</name>
<value>truststore_password</value>
======


2. Below should be used for Kerberos + SSL
beeline -u "jdbc:hive2://xxxxxx10000/default;principal=hive/xxxxx@CREAL;ssl=true;sslTrustStore=/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_truststore.jks;trustStorePassword=trsutpwd"

View solution in original post

4 REPLIES 4

avatar
Guru

 

@Nur 

 

1. are you using SSL ?

2. Provide

beeline -u "jdbc:hive2://Example.com:10000/default;principal=hive/Example.com@EXAMPLE.COM" --berbose=true

 

3. Hiveserver2 logs

 

avatar
New Contributor

1. Yes Iam using ssl

2. In below image have provided the output from the connection string

Nur_0-1677495893240.png

3. Have provided the SS for the log file in the below image.

Nur_1-1677497072695.png

 

avatar
Guru

I see that you are using CDP 7.1.7. Follow below steps if youare using autoTLS

1. Check TrustStore Password:
======
# cat /etc/hive/conf/ssl-client.xml | grep -i -A1 "ssl.client.truststore.password"
<name>ssl.client.truststore.password</name>
<value>truststore_password</value>
======


2. Below should be used for Kerberos + SSL
beeline -u "jdbc:hive2://xxxxxx10000/default;principal=hive/xxxxx@CREAL;ssl=true;sslTrustStore=/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_truststore.jks;trustStorePassword=trsutpwd"

avatar
Community Manager

@Nur, Have the replies 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.  



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: