Home Forums HDP on Linux – Installation Unable to get past step 9 – Hive Metastore start – fails

This topic contains 11 replies, has 4 voices, and was last updated by  Bharath Putta 1 month, 4 weeks ago.

  • Creator
    Topic
  • #58733

    Mark Boddy
    Participant

    Error is that the Hive Metastore does not start and I see this:

    stderr: /var/lib/ambari-agent/data/errors-85.txt

    2014-08-13 17:04:13,454 – Error while executing command ‘start':
    Traceback (most recent call last):
    File “/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py”, line 111, in execute
    method(env)
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_metastore.py”, line 42, in start
    self.configure(env) # FOR SECURITY
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_metastore.py”, line 37, in configure
    hive(name=’metastore’)
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py”, line 108, in hive
    not_if = check_schema_created_cmd
    File “/usr/lib/python2.6/site-packages/resource_management/core/base.py”, line 148, in __init__
    self.env.run()
    File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 149, in run
    self.run_action(resource, action)
    File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 115, in run_action
    provider_action()
    File “/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py”, line 239, in action_run
    raise ex
    Fail: Execution of ‘export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED]‘ returned 1. Metastore connection URL: jdbc:mysql://hadoop.monicoinc.local/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 ***

    stdout: /var/lib/ambari-agent/data/output-85.txt – (actual text of this file is output)

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #59703

    Bharath Putta
    Participant

    Finally got it working. All i had to do was add mysql port to jdbc url in /etc/alternatives/hive-conf/hive-site.xml.

    Please let me know better way to fix this.

    Collapse
    #59701

    Bharath Putta
    Participant

    When i run command manually on command prompt after creating user, database hive and granting privileges, they run fine. But how do i make this run through Ambari?

    export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord *****

    Collapse
    #59700

    Bharath Putta
    Participant

    Am trying to install 2.1.5 and struggling to get hive metastore start. Created hive database, gave all permissions to hive user. if anyone has got this error and resolved it could you please share.

    2014-09-03 05:51:43,108 – Error while executing command ‘start':
    Traceback (most recent call last):
    File “/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py”, line 111, in execute
    method(env)
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_metastore.py”, line 42, in start
    self.configure(env) # FOR SECURITY
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_metastore.py”, line 37, in configure
    hive(name=’metastore’)
    File “/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive.py”, line 108, in hive
    not_if = check_schema_created_cmd
    File “/usr/lib/python2.6/site-packages/resource_management/core/base.py”, line 148, in __init__
    self.env.run()
    File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 149, in run
    self.run_action(resource, action)
    File “/usr/lib/python2.6/site-packages/resource_management/core/environment.py”, line 115, in run_action
    provider_action()
    File “/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py”, line 239, in action_run
    raise ex
    Fail: Execution of ‘export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED]‘ returned 1. Exception in thread “main” java.lang.NoSuchFieldError: METASTORE_SCHEMA_VERIFICATION
    at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:469)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

    Collapse
    #59003

    Mark Boddy
    Participant

    Alejandro,

    Ultimately, I created the Hive user in MySQL manually and that got me past this so that I was able to complete the install.

    Thank-You for your help!
    Mark

    Collapse
    #58837

    Alejandro Fernandez
    Participant

    You can also try to run the schematool command that is failing, with some additional flags

    /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose -dryRun
    /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose

    Collapse
    #58835

    Mark Boddy
    Participant

    Hello Alejandro,

    I uninstalled everything and started over again just to make sure that MySQL was running. It was, nothing has changed, I get the same error.

    Thanks for the follow up, I am still looking through log files to see if I’ve missed anything.
    Mark

    Collapse
    #58818

    Alejandro Fernandez
    Participant

    Hi Mark, any update on whether the mysqld service was running at the time of installation, or if it works after retrying while mysqld is running?

    Collapse
    #58774

    Mark Boddy
    Participant

    Hello Alejandro,

    Yes, I did install Hive and selected to use a new MySQL database and mysqld is running…I don’t recall it being installed prior to starting the Ambari installation but I will check to make sure it was not.

    Collapse
    #58770

    Alejandro Fernandez
    Participant

    Hi Mark, I’m guessing you installed Hive and selected to use a new MySQL database.
    Can you check if the mysqld service is running?
    > /sbin/service mysqld status
    If you have an existing installation of sql, it may be called “mysql” without the “d”

    Collapse
    #58745

    Mark Boddy
    Participant

    My apologies, those *minor” details…

    1. CentOS 6.5
    2. Ambari 1.6.1-98
    3. HDP 2.1 stack
    4. I am having Ambari install the MySQL instance for me using defaults, database=hive, user=hive.

    I have updated the OS and chose what I thought were the basic default options throughout. and only running on a single server.

    Thank-you!

    Collapse
    #58735

    Jeff Sposetti
    Moderator

    Hi, a few questions:

    1) Which OS?
    2) What version of Ambari?
    3) What Stack did you choose?
    4) You are using an existing MySQL or having Ambari install the MySQL instance for you?

    Thanks.

    Collapse
Viewing 11 replies - 1 through 11 (of 11 total)