When trying to start Hive Metastore with Ambari, the following error is displayed:
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 ***
The reason for this issue is that the Hive Metastore cannot access the Hive database.
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 with Ambari once again.