Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Beeline does not give any response

Highlighted

Beeline does not give any response

When try to open hive through beeline it connects properly to beeline-hiveserver2, but if I use any query on that then it does not give response. for ex. if I hit query show databases then give just empty list (no database is shown). Ideally it should show the list of databases present on that cluster.

15 REPLIES 15
Highlighted

Re: Beeline does not give any response

@Anjali Shevadkar

Do you have Ranger policies defined for Hive? If yes, check if the login user has use/select on the databases.

Also, you could check the 'show databases' from Hive Cli as it by-passes the Ranger.

Highlighted

Re: Beeline does not give any response

@Sindhu Yes I have a ranger policy for hive and login user has all permissions on all databases. And I have also checked on hive cli show databases its working it gives us all databases.

Highlighted

Re: Beeline does not give any response

@Anjali Shevadkar

Can you share the screenshot of the Ranger policy and also, error snippet from Hiveserver2 log?

Highlighted

Re: Beeline does not give any response

80407-sc5.png

I don't know how to check hiveserver2 logs.

80408-sc6.png

Highlighted

Re: Beeline does not give any response

@Anjali Shevadkar,

This might be a lame question. Are you sure that you are connecting to the right HiveServer ?

Can you please copy the url from hive configs and try connecting to it

Go to Ambari -> Hive -> Summary -> HiveServer2 JDBC URL (Copy this url) and try to connect to it and see if this works.

.

-Aditya

Re: Beeline does not give any response

@ Aditya Sirna

Yes I am sure that I am connecting to the right hiveserver. Still there is same issue.

Highlighted

Re: Beeline does not give any response

@Anjali Shevadkar

I checked internally and below policy works:

beeline> !connect jdbc:hive2://:2181,:2181,:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Connecting to jdbc:hive2://:2181,:2181,:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Enter username for jdbc:hive2://:2181,:2181,:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: hive
Enter password for jdbc:hive2://:2181,:2181,:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: ****
Connected to: Apache Hive (version 1.2.1000.2.6.5.0-292)
Driver: Hive JDBC (version 1.2.1000.2.6.5.0-292)
0: jdbc:hive2://xxx:> show databases;
+----------------+--+
| database_name|
+---------------+--+
| default|
| testdb |
+----------------+--+2 rows selected (0.362 seconds)

80410-screen-shot-2018-07-05-at-35244-pm.png

Highlighted

Re: Beeline does not give any response

@Anjali Shevadkar

Were you able to verify with the permissions?

Highlighted

Re: Beeline does not give any response

Contributor

@Anjali Shevadkar

Is your cluster kerberized. If so, are you using the relevant kerberos ticket for the user, please confirm

Don't have an account?
Coming from Hortonworks? Activate your account here