Created 10-05-2016 04:20 PM
The error I'm getting when I go into Hive is this:
Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [admin] does not have [USE] privilege on [null] [ERROR_STATUS]
I suspect maybe Ranger isn't setup correctly? Is there a way to make sure all of my users I setup in Ambari are given permissions via Ranger?
Created 10-05-2016 04:27 PM
Full error:
org.apache.ambari.view.hive.client.HiveInvalidQueryException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [admin] does not have [USE] privilege on [null] [ERROR_STATUS] org.apache.ambari.view.hive.client.HiveInvalidQueryException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [admin] does not have [USE] privilege on [null] [ERROR_STATUS] at org.apache.ambari.view.hive.client.Utils.verifySuccess(Utils.java:46) at org.apache.ambari.view.hive.client.Connection.execute(Connection.java:614) at org.apache.ambari.view.hive.client.Connection.executeSync(Connection.java:629) at org.apache.ambari.view.hive.client.DDLDelegator.getDBListCursor(DDLDelegator.java:76) at org.apache.ambari.view.hive.client.DDLDelegator.getDBList(DDLDelegator.java:65) [plus more that didn't fit]
Created 10-05-2016 04:37 PM
@Chris Colvin Pls check - https://community.hortonworks.com/questions/46013/error-while-compiling-statement-failed-hiveaccessc...
*** Create a hive policy in ranger to allow admin user to access hive
Created 10-05-2016 05:47 PM
how do I do that?
Created 02-15-2017 04:53 PM
@Sagar Shimpi same question as @Chris Colvin how do you go about that?
Created 10-05-2016 06:43 PM
Please see the following link on how to use Ranger to give access to user admin (or a group admin belongs to). To make it work, I'll start with giving all access and then start restricting it and see how the behavior changes so the user has most restrictive access but still able to do the job.
Created 04-04-2017 06:55 AM
I created a rule in ranger that allowed select access to @null and default. It seems like a hack but it also seems to work.
Created 05-18-2017 10:04 AM
For me the following fixed it. Set the following configs on hive:
webhcat.proxyuser.root.groups *
webhcat.proxyuser.root.hosts *
Created 06-09-2021 09:25 AM
I had a similar issue. You may want to check Ranger > Audit > Plugin Status to see if the policy is being applied. If it's not it may be that you have a jersey-client classpath conflict. More details here:
https://jonmorisissqlblog.blogspot.com/2021/06/ranger-hive-policy-activation-time.html