Support Questions

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

HiveServer2 JDBC Connection URL for sandbox HDP 2.6

avatar
Explorer

I am trying to connect hive table(HDP 2.6) from nifi PutHiveQL processor and used below URL but getting error

Database Connection URL : jdbc:hive2://sandbox.hortonworks.com:2181/default

15808-error.png

Below is screenshot from my Ambari view of hive

15809-hive2.jpg

What should be correct URL in this case ?? Thanks

8 REPLIES 8

avatar
@punit

Please use below URL for JDBC connection for Hive,

jdbc:hive2://sandbox.hortonworks.com:10000/default

or

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

avatar
New Contributor

Thank you so much. You have saved my final year project.

avatar
New Contributor

Hello,

Can you please explain how can I change the URL for JDBC connection for Hive? Is it something I can do in Ambari or I have to do it in command line?

,

Hello,

Can you explain how I can change the URL for JDBC connection for Hive? Is it possible via the GUI in Ambari?

avatar
New Contributor

Thank you, it also worked for me.

I was trying to connect to hive with a CLI interface (/usr/bin/hive or /usr/bin/beeline), and using the URL connexion show in the Ambari / Services / Hive / Summary interface, the connexion was refused. Using jdbc:hive2://sandbox.hortonworks.com:10000/default, it works

This JIRA page can really help: HiveServer2 Clients. It explains the Connection URL Format and explicits some default (like the default port = 1000)


Phil

72459-capture2.png

avatar
Explorer

thanks @nshelke , I have tried both of them initially but was getting some error.

rightnow I am struggling to start nifi service on HDP2.6 sandbox will confirm as soon as I am able run nifi again.

avatar
Explorer

jdbc:hive2://sandbox.hortonworks.com:10000/default worked atleast

Problem was I was trying to use insert into table A (Column1, Column2, Column3) values (value1, value2, value3) in puthiveQL which does not work but insert into table A values (value1, value2, value3) works

avatar

@punit

If your Hive JDBC problem is solved, Please accept the answer.

avatar
New Contributor

@nshelke

i have got an error while opening Hive

Cannot open a hive connection with connect string

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=maria_dev

can you please help me to resolve this,

,@nshelke

i got an error while opening hive

Cannot open a hive connection with connect string

jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;hive.server2.proxy.user=maria_dev

can you please help me to resolve this