Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Hive issue

I am Getting this issues when testing from command line

beeline -u jdbc:hive2://serverip:10000 user pass

Connecting to
jdbc:hive2://server ip:10000

18/03/12 10:14:36
[main]: WARN jdbc.HiveConnection: Failed to connect to serverip:10000

Error: Could not
open client transport with JDBC Uri: jdbc:hive2://serverip:10000: Peer
indicated failure: Unsupported mechanism type PLAIN (state=08S01,code=0)

Beeline version
1.2.1000. by Apache Hive

jdbc:hive2://serverip:10000 (closed)> !quit


Rising Star
@Sam Red

can you try putting quotes around your connection string or try connecting through beeline prompt.

1. Enter beeline

2. !connect jdbc:hive2://serverip:10000


I did same steps both ways but still getting issue. But when i turn off hive server 2 authorization i am able to access but when it turn it on i am not able to access generated a keytab in Default too for Hive,

Super Mentor

@Sam Red

The following error indicates that you might be trying to connect to a HiveServer2 which is running in secure mode (means Kerberized). So please check your Hive config to know "hive.server2.autnentication" if it is set to "kerberos"

jdbc:hive2://xxxxxxxxxxx:10000/default: Peer indicated failure: Unsupported mechanism type PLAIN (state=08S01,code=0)

If that is the case then you should be adding the principal in the URL as following"

# kinit -kt /etc/security/keytabs/hive.service.keytab hive/
# beeline
beeline> !connect jdbc:hive2://HS2_hostname:10000/default;principal=hive/HS2_HOST@REALM


Here you will need to replace the "principal=hive/HS2_HOST@REALM" with your HS2 principal and you might be having your own keytab. So you will need to choose it accordingly.

There are some examples for Secure and Non Secure Hive Server 2 connection URLs:

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.