Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive Metastore Won't Start on HDP 3.0 with MySQL on Centos 7

Hive Metastore Won't Start on HDP 3.0 with MySQL on Centos 7

Super Guru
2018-07-16 19:47:37,043 - File['/usr/hdp/current/hive-metastore/conf/hivemetastore-site.xml'] {'owner': 'hive', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': 0600, 'encoding': 'UTF-8'}
2018-07-16 19:47:37,065 - File['/usr/hdp/current/hive-metastore/conf/hadoop-metrics2-hivemetastore.properties'] {'content': Template('hadoop-metrics2-hivemetastore.properties.j2'), 'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2018-07-16 19:47:37,066 - File['/var/lib/ambari-agent/tmp/start_metastore_script'] {'content': StaticFile('startMetastore.sh'), 'mode': 0755}
2018-07-16 19:47:37,068 - HdfsResource[None] {'security_enabled': False, 'hadoop_bin_dir': '/usr/hdp/3.0.0.0-1634/hadoop/bin', 'keytab': [EMPTY], 'dfs_type': 'HDFS', 'default_fs': 'hdfs://princeton0.field.hortonworks.com:8020', 'hdfs_resource_ignore_file': '/var/lib/ambari-agent/data/.hdfs_resource_ignore', 'hdfs_site': ..., 'kinit_path_local': 'kinit', 'principal_name': 'missing_principal', 'user': 'hdfs', 'action': ['execute'], 'hadoop_conf_dir': '/usr/hdp/3.0.0.0-1634/hadoop/conf', 'immutable_paths': [u'/mr-history/done', u'/warehouse/tablespace/managed/hive', u'/warehouse/tablespace/external/hive', u'/app-logs', u'/tmp']}
2018-07-16 19:47:37,073 - Directory['/usr/lib/ambari-logsearch-logfeeder/conf'] {'create_parents': True, 'mode': 0755, 'cd_access': 'a'}
2018-07-16 19:47:37,074 - Generate Log Feeder config file: /usr/lib/ambari-logsearch-logfeeder/conf/input.config-hive.json
2018-07-16 19:47:37,074 - File['/usr/lib/ambari-logsearch-logfeeder/conf/input.config-hive.json'] {'content': Template('input.config-hive.json.j2'), 'mode': 0644}
2018-07-16 19:47:37,076 - Execute['export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/ ; /usr/hdp/current/hive-server2/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose'] {'not_if': "ambari-sudo.sh su hive -l -s /bin/bash -c 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/ ; /usr/hdp/current/hive-server2/bin/schematool -info -dbType mysql -userName hive -passWord [PROTECTED] -verbose'", 'user': 'hive'}
2018-07-16 19:47:43,692 - Skipping Execute['export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/ ; /usr/hdp/current/hive-server2/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose'] due to not_if 

2018-07-16 19:47:43,696 - Execute['export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/ ; /usr/hdp/current/hive-server2/bin/schematool -initSchema -dbType hive -metaDbType mysql -userName hive -passWord [PROTECTED] -verbose'] {'not_if': u"ambari-sudo.sh su hive -l -s /bin/bash -c 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/ ; /usr/hdp/current/hive-server2/bin/schematool -info -dbType hive -metaDbType mysql -userName hive -passWord [PROTECTED] -verbose'", 'user': 'hive'}

3 REPLIES 3
Highlighted

Re: Hive Metastore Won't Start on HDP 3.0 with MySQL on Centos 7

@Timothy Spann

I tried with my cluster and the initSchema from Ambari times out, however table creation proceeds through command line. Could you check the version of MySQL and verify if the version of MySQL supported 'if not' keyword?

Re: Hive Metastore Won't Start on HDP 3.0 with MySQL on Centos 7

New Contributor

Hi @Timothy Spann,

I have the same exact problem in an almost identical environment. The main difference (and maybe only one ?) is that I use PostgreSQL instead of MySQL. The "Hive Metastore Start" phase stalls right after the second call to "schematool -initSchema". It runs for a long time, then timeouts because of python and gives me that message in stderr:

Python script has been killed due to timeout after waiting 1200 secs

I tried running the command line myself, but it takes forever (a little bit more than 180s per table).

Did you find a solution to this problem? If you have one, it would be much appreciated!

Re: Hive Metastore Won't Start on HDP 3.0 with MySQL on Centos 7

New Contributor

Hi @Timothy Spann @Arnaud RIVERO

Today I tried to install HDP 3.0.0 on my test environment with ubuntu 16.04 and MySQL 5.7 and I`m having the same problem as you. Did you find any solution?

Don't have an account?
Coming from Hortonworks? Activate your account here