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.

Hive view raise Failed to execute statement: show databases like '*'

Hive view raise Failed to execute statement: show databases like '*'

New Contributor

Hi,

We have just deploy a new HDP 2.6 cluster with kerberos and ranger enable and have problemas with security setup.

It has been created a new policy on ranger allowing access to a hive database (for all tables and columns) and assigned to a user.

When logging on ambari-views (Hive View 2.0) no show any database and raise the following error:

Failed to execute statement: show databases like '*'
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [xxxxxxxxxx] does not have [USE] privilege on [Unknown resource!!]

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [xxxxxxxxxxxxxx] does not have [USE] privilege on [Unknown resource!!]
	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:264)
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:250)
	at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:309)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:250)
	at org.apache.ambari.view.hive20.HiveJdbcConnectionDelegate.execute(HiveJdbcConnectionDelegate.java:49)
	at org.apache.ambari.view.hive20.actor.StatementExecutor.runStatement(StatementExecutor.java:91)
	at org.apache.ambari.view.hive20.actor.StatementExecutor.handleMessage(StatementExecutor.java:72)
	at org.apache.ambari.view.hive20.actor.HiveActor.onReceive(HiveActor.java:38)
	at akka.actor.UntypedActor$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
	at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
	at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
	at akka.actor.ActorCell.invoke(ActorCell.scala:487)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
	at akka.dispatch.Mailbox.run(Mailbox.scala:220)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Is is missing another privilegies ??

Regards

4 REPLIES 4

Re: Hive view raise Failed to execute statement: show databases like '*'

Super Mentor

@Jorge Alonso

As you have recently enabled Ranger Policy so can you please check if you have the Hive Ranger Plugin is enabled properly or not?

Better to disable the hive ranger plugin and then enable it back from ambari UI and then try again.

Re: Hive view raise Failed to execute statement: show databases like '*'

New Contributor

The Hive ranger plugin was enables, I had disabled (restart hive), enable again but the issue persists

Re: Hive view raise Failed to execute statement: show databases like '*'

New Contributor

@Jorge Alonso - Please go to Ranger - Service Manager - Hive you should see the clustername_hive tab.

Click on it , you will find 4 policies in Ranger by default.

Check the policy related to - all database, udf - grant access to your user/hive user.

Let me know how it goes.

Re: Hive view raise Failed to execute statement: show databases like '*'

New Contributor

Hi @Bhanu Pamu

, I'd grant access my to policy "all database, udf" but raise the same error

Any idea?

Thanks

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