Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

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

Master Collaborator

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

Explorer

It's a wrong jdbc class name for uri.

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

what i usually do is beeline >

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

Explorer

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

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

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

Master Collaborator

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?

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

Master Collaborator

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>

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

Master Collaborator

So indeed it was a corrupted client, in that case please accept my first answer.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.