Support Questions

Find answers, ask questions, and share your expertise

Hive Metastore failed to start in HDP 2.3.4.0-3485 ??

avatar
Super Collaborator
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://ambari/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 ***

1 ACCEPTED SOLUTION

avatar
Master Guru

Are you using an existing Mysql DB? This often happens when the Hive DB user doesn't have privileges to access Hive DB from another host. If you let Ambari install and create new Hive DB then Ambari will set them. You can inspect your current users and give privileges using following commands (assuming your Hive user is called 'hive'):

SELECT User,Host FROM mysql.user;
SHOW GRANTS FOR 'hive'@'%';     -- Possibly returns nothing
GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%';

The last command will solve all your troubles, but you can also replace '%' with the host name of the node where Hive Metastore is running.

View solution in original post

3 REPLIES 3

avatar
Master Mentor

Did it work before? Did it ever pass service check? Did you attempt an upgrade? Please post logs from /var/log/hive

avatar
Master Guru

Are you using an existing Mysql DB? This often happens when the Hive DB user doesn't have privileges to access Hive DB from another host. If you let Ambari install and create new Hive DB then Ambari will set them. You can inspect your current users and give privileges using following commands (assuming your Hive user is called 'hive'):

SELECT User,Host FROM mysql.user;
SHOW GRANTS FOR 'hive'@'%';     -- Possibly returns nothing
GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%';

The last command will solve all your troubles, but you can also replace '%' with the host name of the node where Hive Metastore is running.

avatar
Contributor

what about postgresql ??