Created 11-26-2017 12:27 AM
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 ***
Created 11-26-2017 05:54 AM
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 )
Created 11-26-2017 05:44 PM
a. postgresql is on stlhd01thp.centene.com and status is up and running
b. I have tried with upgrading but dint work for me.
Created 11-26-2017 09:46 AM
Verify the Postgres table query 'select * from "version";'.
Created 11-26-2017 05:41 PM
Yes I am able to query it.
Created 12-22-2017 10:09 AM
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
Created 12-22-2017 10:23 AM
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.