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.

Issue when enable the ranger plugin.

Highlighted

Issue when enable the ranger plugin.

New Contributor

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.

10 REPLIES 10

Re: Issue when enable the ranger plugin.

Contributor

Hi @Anjali Shevadkar,

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

Gonçalo

Re: Issue when enable the ranger plugin.

New Contributor

@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.

Re: Issue when enable the ranger plugin.

Mentor

@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;
OK
Time taken: 28.399 seconds
hive> create database test2;
OK
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.2.6.2.0-205)
Driver: Hive JDBC (version 1.2.1000.2.6.2.0-205)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://{hive_host_server}:10000/> show databases;

Are you able to see the need databases in beeline?

Re: Issue when enable the ranger plugin.

New Contributor

@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.

Re: Issue when enable the ranger plugin.

Mentor

@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?

Re: Issue when enable the ranger plugin.

New Contributor

@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.

Re: Issue when enable the ranger plugin.

Mentor

@Anjali Shevadkar

Can you share the output of

$ hdfs dfs -ls /apps/hive/warehouse

Please revert

Re: Issue when enable the ranger plugin.

New Contributor

@Geoffrey Shelton Okot

sc3.png O/P

$ hdfs dfs -ls /apps/hive/warehouse

Re: Issue when enable the ranger plugin.

Mentor

@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.


beeline.jpg