Support Questions
Find answers, ask questions, and share your expertise

Issue when enable the ranger plugin.

I am using Ranger 0.7.0 on cluster. I have enabled the Ranger plugin and hive, hdfs plugins. When I was login to the hive through beeline to check that the policy is working or not, that time I have use the ' show databases' query and it does not show any database. There is a empty list of dbs. If I disable the plugins then all it gave the list of databases.



Hi @Anjali Shevadkar,

Check Ranger Audits, probably you don't have permissions.


@Gonçalo Cunha I have checked , I have given all the access for all database ,all coloum , all tables to the user still there is a same issue.


@Anjali Shevadkar

Can you open 2 windows one with a hive CLI and the other with beeline.
On the hive CLI run a create databases i.e

hive> create database test1;
Time taken: 28.399 seconds
hive> create database test2;
Time taken: 0.111 seconds

Then on the beeline CLI run the show db

$ beeline
beeline>  ! connect jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}
Connecting to jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}
Enter username for jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}: hive
Enter password for jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}: ****
Connected to: Apache Hive (version 1.2.1000.
Driver: Hive JDBC (version 1.2.1000.
0: jdbc:hive2://{hive_host_server}:10000/> show databases;

Are you able to see the need databases in beeline?

@Geoffrey Shelton Okot I have done this also, I have open 2 windows hive cli and beeline (beeline UN: hive, pass:hive). But I can not see any database when I used ' show databases'. Now I have disabled the plugin then it showed all databases.


@Anjali Shevadkar

Have you created a test database and the show databases from beeline doesn't show the newly created databases?

Can you share a screenshot of your ranger policies?

@Geoffrey Shelton Okot Yes I have created test databases and show databases from beeline doesn't show newly created databases also.

sc11.png in this screenshot I have created test databases on hive. On hive it's working fine.

sc2.png in this I have used 'show databases' query on beeline. It gave empty list.

Beeline does not work.

I have created DB on beeline also and again hit the query ' show databases' still it does not show any DB.


@Anjali Shevadkar

Can you share the output of

$ hdfs dfs -ls /apps/hive/warehouse

Please revert

@Geoffrey Shelton Okot

sc3.png O/P

$ hdfs dfs -ls /apps/hive/warehouse


@Anjali Shevadkar

I see the below databases, can we do a test with for example user anjali database testh3.db

pradeep   user_rwadata_salesforce_persistentsysuatcs92.db
ganesh    trail_exchagne_headers.db
anjali    testh1.db,testh2.db,testh3.db
hive      testh4.db

In ranger UI create a policy like (see beeline.jpg) below and try accessing it through beeline and revert.


@geoffrey Shelton Okot I have created ranger policy as you said. I gave all access to the Anjali user. I tried to access through hive. the result is, when I hit query ' use testh3;' no error. But when I hit query ' show tables;' then there is empty list(NO tables found).


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