Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.2.1.1
-
None
-
None
-
Ambari 2.2.2.1
Description
BACKGROUND:
Hive cli is disabled by adding below lines to hive-env-template in hive configuration.
if [ "$SERVICE" = "cli" ]; then echo "Sorry! hive cli has been disabled for security purpose, please use beeline instead." exit 1 fi
PROBLEM :
After disabling the hive shell , Ambari is reporting that the hive metastore is in critical state.
Below is the error:
Metastore on metastorehost.com 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://xxxxxxxxxxxxx: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. stty: standard input: Inappropriate ioctl for device tset: standard error: Invalid argument stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device Value of TERM has been set to "dumb". stty: standard input: Inappropriate ioctl for device Sorry! hive cli has been disabled for security purpose, please use beeline instead. logout root )
Since ambari scripts are using hive command to get the metastore health status the health check is failing.
hive --hiveconf hive.metastore.uris=thrift://hostname: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;''
This is a feature enhancement request to use the beeline command to check hive meta store health status.