Created 03-28-2016 08:43 AM
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 ***
Created 03-28-2016 11:21 AM
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.
Created 03-28-2016 10:56 AM
Did it work before? Did it ever pass service check? Did you attempt an upgrade? Please post logs from /var/log/hive
Created 03-28-2016 11:21 AM
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.
Created 11-25-2017 01:59 AM
what about postgresql ??