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.

Simple Hive Queries are not executing. Showing Exceptions in CLI

Simple Hive Queries are not executing. Showing Exceptions in CLI

New Contributor

while using Hive CLI, Even for show databases query, I am getting Exception "Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.05 seconds"

Recently built a new cluster and all the services are up and running fine.

Hive version - 1.2.1.2.4

HP version - 2.4.0.0

And we cant find any errors in Log, The services are running good. We are using Mysql DB as metastore db,it is working fine. I tried re-installing the service also,again the same error continues.

Compression is default codec.

Even the smoke test of hive internally is running and giving the same error.

Ambari metrics throwing errors for hive metastore are:-

Metastore on hive02.hadoop.va1.247-inc.net failed (Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py", line 183, in execute
  timeout=int(check_command_timeout) )
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
  self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 158, in run
  self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, in run_action
  provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
  tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
  result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
  tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
  result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
  raise Fail(err_msg)
Fail: Execution of 'export HIVE_CONF_DIR='/usr/hdp/current/hive-metastore/conf/conf.server' ; hive --hiveconf hive.metastore.uris=thrift://hive02.hadoop.va1.247-inc.net:9083  --hiveconf hive.metastore.client.connect.retry.delay=1  --hiveconf hive.metastore.failure.retries=1  --hiveconf hive.metastore.connect.retries=1  --hiveconf hive.metastore.client.socket.timeout=14  --hiveconf hive.execution.engine=mr -e 'show databases;'' returned 1. WARNING: Use "yarn jar" to launch YARN applications.
Logging initialized using configuration in file:/etc/hive/2.4.0.0-169/0/conf.server/hive-log4j.properties
OK
Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object
Time taken: 2.118 seconds
)

Any help will be appreciated.

3 REPLIES 3

Re: Simple Hive Queries are not executing. Showing Exceptions in CLI

Expert Contributor

@shaheer mannan can you increase the log level to DEBUG and see what hive is trying to do?

Also, can you try beeline instead of Hive CLI and see what error message it throws?

Re: Simple Hive Queries are not executing. Showing Exceptions in CLI

New Contributor

beeline is working fine Please find the output

Connected to: Apache Hive (version 1.2.1000.2.4.0.0-169)
Driver: Hive JDBC (version 1.2.1000.2.4.0.0-169)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000> show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default  |
+----------------+--+
1 row selected (0.269 seconds)
0: jdbc:hive2://localhost:10000> use default;
No rows affected (0.179 seconds)
0: jdbc:hive2://localhost:10000> show tables;
+-----------+--+
| tab_name  |
+-----------+--+
+-----------+--+
No rows selected (0.121 seconds)
0: jdbc:hive2://localhost:10000>

How do i enable the log level to DEBUG in hive.

Re: Simple Hive Queries are not executing. Showing Exceptions in CLI

@shaheer mannan

Can you please run below commands and share the logs from from ambari node and the node where metastore running(if node is different?

export HIVE_CONF_DIR='/usr/hdp/current/hive-metastore/conf/conf.server' ;

hive --hiveconf hive.root.logger=DEBUG,console --hiveconf hive.metastore.uris=thrift://hive02.hadoop.va1.247-inc.net:9083 --hiveconf hive.metastore.client.connect.retry.delay=1 --hiveconf hive.metastore.failure.retries=1 --hiveconf hive.metastore.connect.retries=1 --hiveconf hive.metastore.client.socket.timeout=14 --hiveconf hive.execution.engine=mr -e 'show databases;'

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