You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Kaliyug Antagonist <ka...@gmail.com> on 2015/10/30 17:55:41 UTC

Hive metastore issue after cluster cleaning and re-installation

I had cleaned an erroneous installation of HDP and updated Ambari. I have
now installed HDP 2.3 using Ambari 2.1.2

Several services are failing to start, one being  Hive Metastore. The error
is :

stderr:   /var/lib/ambari-agent/data/errors-790.txt

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 219, 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 55, in start
    self.configure(env)  # FOR SECURITY
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py",
line 66, 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 152, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 118, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
line 260, 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
mysql -userName hive -passWord [PROTECTED]' returned 1. WARNING: Use
"yarn jar" to launch YARN applications.
Metastore connection URL:	
jdbc:mysql://l1033lab.sss.se.scania.com/hive?createDatabaseIfNotExist=true
Metastore Connection Driver :	 com.mysql.jdbc.Driver
Metastore connection User:	 hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get
schema version.
*** schemaTool failed ***

Re: Hive metastore issue after cluster cleaning and re-installation

Posted by Alejandro Fernandez <af...@hortonworks.com>.
Hi Kaliyug,

Can you make sure you can connect to the Hive Metastore?
JDBC properties are correct,
Config file is present,

And also try running it manually with the -verbose and -dryRun options,

su hive
export HIVE_CONF_DIR=/etc/hive/conf (example)
usr/hdp/current/hive-metastore/bin/schematool -dbType mysql -verbose -dryRun -upgradeSchema

Thanks,
Alejandro

From: Kaliyug Antagonist <ka...@gmail.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Friday, October 30, 2015 at 9:55 AM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Hive metastore issue after cluster cleaning and re-installation

I had cleaned an erroneous installation of HDP and updated Ambari. I have now installed HDP 2.3 using Ambari 2.1.2

Several services are failing to start, one being  Hive Metastore. The error is :

stderr:   /var/lib/ambari-agent/data/errors-790.txt

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 219, 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 55, in start
    self.configure(env)  # FOR SECURITY
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 66, 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 152, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 260, 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 mysql -userName hive -passWord [PROTECTED]' returned 1. WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:        jdbc:mysql://l1033lab.sss.se.scania.com/hive?createDatabaseIfNotExist=true<http://l1033lab.sss.se.scania.com/hive?createDatabaseIfNotExist=true>
Metastore Connection Driver :    com.mysql.jdbc.Driver
Metastore connection User:       hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed ***