I'm facing difficulties in connecting to Hiveserver2 JDBC and Hiveserver2 interactive JDBC URLs on my HDP 2.6.5 cluster.
Using DBeaver, I'm able to connect directly to port 10000 of Hive server. Connecting to the URLs shown in Hive summary page (port 2181) in Ambari throws several the following exception:
Could not open client transport with JDBC Uri: jdbc:hive2://nn1.int.net:2181: null
I'm using hive-uber JAR from https://github.com/timveil/hive-jdbc-uber-jar/releases; which works fine connecting to Hive service on port 10000. No issues connecting via beeline.
Is there something I'm missing?
Hi you can try for Hiveserver2:
If you are running HDP2.x, then try following url:
jdbc:hive2://<zookeeper server host name>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
for HDP3.0, try below:
jdbc:hive2://<zookeeper server host name>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-interactive
Also, make sure, Hiveserver2Interective(HSI) is actually running (do a ps -ef |grep llap) on the host where HSI is installed.
Forgot to mention that I've tried that in DBeaver but returned the following error:
Could not open client transport with JDBC Uri: jdbc:hive2://nn1.int.net:2181/cdr: null org.apache.thrift.transport.TTransportException
I've set serviceDiscoveryMode and zooKeeperNamespace properties under Driver Properties -> User Properties in DBeaver.
Can you provide more information:
1. From which OS you are trying to connect
2. In hive server configuration which transport protocol you have (binary or http)
3. Your cluster is kerberized or not
Following up on this. All services are up and running.
Is there another tool I can use besides DBeaver to connect to HiveServer2?