Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive issue

Hive issue

New Contributor

I am Getting this issues when testing from command line

[root@hostnmae~]#
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.2.5.6.0-40 by Apache Hive


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




3 REPLIES 3
Highlighted

Re: Hive issue

Contributor
@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

Re: Hive issue

New Contributor

@rtrivedi

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,

Re: Hive issue

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/tesths2.example.com@EXAMPLE.COM
# 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: https://community.hortonworks.com/articles/4103/hiveserver2-jdbc-connection-url-examples.html