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

Unable to connect to Hive while the services are up and running on ambari

Unable to connect to Hive while the services are up and running on ambari

New Contributor



All the HIVE services are up and running on the ambari UI but we are unable to query hive. can see 2 critical alerts and logs are as below. Apache Ranger is up and running and all policies are available too.

While using any user to query "show databases" getting this error 

SQL Error [40000] [42000]: Error while compiling statement:

FAILED: HiveAccessControlException Permission denied:

user [xxxxxx] does not have [USE] privilege on [Unknown resource!!]

Connection failed on host (Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/HIVE/package/alerts/", line 204, in execute
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/", line 84, in check_thrift_port_sasl
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 166, in __init__
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 124, in run_action
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/", line 263, in action_run
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
ExecutionFailed: Execution of 'beeline -n hive -u 'jdbc:hive2://;transportMode=http;httpPath=cliservice' -n 'xxxxxxx' -p '[PROTECTED]' -e ';' 2>&1 | awk '{print}' | grep -i -e 'Connected to:' -e 'Transaction isolation:'' returned 1. 

Screen Shot 2021-04-16 at 5.31.04 PM.png