Pivotal Knowledge Base

Follow

Hive Metastore does not start, shows error message "Failed to get schema version"

Environment

Product Version
Pivotal HD 3.0.x
Ambari 1.7.1 / 2.x
Hive 0.14.x

Symptom

When trying to start Hive Metastore via Ambari, the following error is seen:

 

The error message is shown below:

resource_management.core.exceptions.Fail: Execution of 'export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/phd/current/hive-metastore/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED]' returned 1. Metastore connection URL:	 jdbc:mysql://dn2.lab/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 ***

Cause

The reason for this issue is that the Hive Metastore cannot access the Hive database.

Resolution

During the installation of Hive, a database is generally set up or initiated. The above error indicates that for some reason, the Hive Metastore cannot access this database. 

1. In Ambari under Hive/Configs/Advanced, confirm that the following configurations are correct:

2. Confirm that the relational database management system (RDMS) in use allows access to the Hive Database from the Hive Metastore host by following similar steps as in shown in this article: HiveServer2 fails to start because host is not allowed to connect to this MySQL server.

3. Restart the Hive Metastore via Ambari once again.

 

Comments

Powered by Zendesk