Support Questions
Find answers, ask questions, and share your expertise

Hive connectivity Issue

Hive connectivity Issue

After Kerberos regenerated from ambari view not able to run this code

Connection cnct1 = DriverManager.getConnection("jdbc:hive2://serverip:10000/test","user","test")

HiveConnection:Could not open client transport with JDBC Uri: jdbc:hive2://serverIp:10000/test: Peer indicated failure: Unsupported mechanism type PLAIN

2 REPLIES 2

Re: Hive connectivity Issue

Super Mentor

@Sam Red

After enabling kerberos on Hive, Client will need to have two things:

1. A valid URL whihc has the principal name appended to it something like:

jdbc:hive2://m1.hdp.local:10000/test;principal=hive/_HOST@HDP.LOCAL

2. A valid kerberos ticket on the client side.

Following article talks more about various hiveserver2 URL formats for kerberized cluster. https://community.hortonworks.com/articles/4103/hiveserver2-jdbc-connection-url-examples.html

.

https://community.hortonworks.com/questions/1807/connecting-to-kerberos-enabled-hive-via-jdbc-direc....

.

Re: Hive connectivity Issue

@Jay Kumar SenSharma Still I am having issues on this connectivity
[root@hostnmae~]#beeline -u jdbc:hive2://serverip:10000 user pass  

Connecting tojdbc:hive2://server ip:10000  

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

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

Beeline version1.2.1000.2.5.6.0-40 by Apache Hive  

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