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.

Unable to start Hive services

Highlighted

Unable to start Hive services

New Contributor

Getting Below error.

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 245, in <module>
    HiveMetastore().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 58, in start
    self.configure(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 72, in configure
    hive(name = 'metastore')
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 292, in hive
    user = params.hive_user
  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)
resource_management.core.exceptions.Fail: Execution of 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-metastore/bin/schematool -initSchema -dbType postgres -userName hive -passWord [PROTECTED]' returned 1. WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:	 jdbc:postgresql://stlhd01thp.centene.com:5432/hive
Metastore Connection Driver :	 org.postgresql.Driver
Metastore connection User:	 hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version. 

*** schemaTool failed ***

6 REPLIES 6

Re: Unable to start Hive services

Explorer

You get the exception in either of the following cases.

a. Your hive metastore db (i.e postgresql in your case) is either not on stlhd01thp.centene.com (or)

b. Your hive postgresql metastore db might be on stlhd01thp.centene.com , however, version might not be same as your hive version (if this is the case you may have to upgrade the hive schema version using example https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool )

Re: Unable to start Hive services

New Contributor

a. postgresql is on stlhd01thp.centene.com and status is up and running

b. I have tried with upgrading but dint work for me.

Re: Unable to start Hive services

@Sai Sandeep

Verify the Postgres table query 'select * from "version";'.

Re: Unable to start Hive services

New Contributor

Yes I am able to query it.

Re: Unable to start Hive services

Rising Star

@Sai Sandeep

this could also occur in case hive user password issue. modify exact password in HIve configs via Ambari.

drop metastore db and rerun schema tool

$HIVE_HOME/bin/schematool -initSchema -dbType postgres

Re: Unable to start Hive services

Mentor

@Sai Sandeep

Can you share your /var/lib/pgsql/data/postgresql.conf and /var/lib/pgsql/data/pg_hba.conf files? You might not be having the correct entries.

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