Support Questions

Find answers, ask questions, and share your expertise

hi , I am having trouble connecting to beeline. ... Please help me

avatar
Contributor

26385-capture.png

ERROR: Url i used to connect to beeline is jdbc:hihve2://hostname:10000/default .I am using oracle as my hive metastore database. ojdbc6 jar is downloaded and kept at /usr/hdp/2.../hive/lib.My transport mode is binary.After adding these jars when i am logged in as root i can connect to beeline with my ldap uid and pwd. But when i am logged with user id in linux machine and try to connect to beeline. I am getting the same error again

1 ACCEPTED SOLUTION

avatar

The above error is more indicative of a corrupted instal of the hive client. You mentioned that you are able to connect with LDAP userid and password. In the case where you are getting the error did you launch the beeline cli from the same machine where you launched when you were successfully able to connect using LDAP credentials?

View solution in original post

10 REPLIES 10

avatar
Rising Star

It's a wrong jdbc class name for uri.

Try to use this "beeline jdbc:hive2://hostname:10000/default" instead of.

avatar
Contributor

what i usually do is beeline >

!connect jdbc:hive2://hostname:port/default with " " and withh out.I tried both but it did not work.

avatar
Rising Star

Then, check the hostname which is installed with hiveserver2 on a node.

avatar
Expert Contributor
@pv poreddythe connection string you are using from you screen shot is: jdbc:hive2//<servername>:10000 which is missing a colon (:) it is supposed to be jdbc:hive2://<servername>:10000 for more details you can refer to: https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients

avatar
Contributor

I have given url correctly. But it doesn't work and still stays the same error

avatar

The above error is more indicative of a corrupted instal of the hive client. You mentioned that you are able to connect with LDAP userid and password. In the case where you are getting the error did you launch the beeline cli from the same machine where you launched when you were successfully able to connect using LDAP credentials?

avatar
Contributor

yes @Deepesh,I launched both beeline from the same machine. if there is a corrupted install of hive client, please suggest me a solution as in what steps needs to be taken. Also I am using ambari 2.2.2.0 and hdp 2.4.2... when i click on hive service, I do not see the jdbc url down and also the quick links option. Thanks

avatar

I am assuming this is an unsecure cluster, is that right?

On that machine, can you put out the complete console log from the terminal and i would suggest just starting the beeline and then put the connect statment:

$ beeline
...
> !connect jdbc:hive2://<hivehost>:10000 <user> <pwd>

avatar
Contributor

I do not know what went wrong but i removed the hive client and installed it again and it worked this time. Thanks