Support Questions

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

Difficulties connecting to Hiveserver2 JDBC URLs via Zookeper

avatar
Contributor

Hi all,

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?

Thanks.

6 REPLIES 6

avatar
Rising Star

Hi you can try for Hiveserver2:

jdbc:hive2://<zk1>:2181,<zk2>:2181,<zk3>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver

avatar
Contributor
@Mike Lok

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.

avatar
Contributor

Hi @Giorgi Chitashvili,

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.

Thanks.

avatar
Rising Star

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

avatar
Contributor

@nkumar

Using HDP2.6. Both URLs I tried are taken directly from Ambari console. HSI services are running and functional. Verified by using beeline.

Thanks.

avatar
Contributor

93145-hive.png

Following up on this. All services are up and running.

Is there another tool I can use besides DBeaver to connect to HiveServer2?