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 2 Server Not Staring

Solved Go to solution
Highlighted

Hive 2 Server Not Staring

Rising Star

I completed the installation of a 4 node HDP cluster. Almost everything is up and running except for Hive Server. when I try to start the hive server. I get an error

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py", line 161, in <module>
    HiveServer().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 375, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py", line 77, in start
    self.configure(env) # FOR SECURITY
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 120, in locking_configure
    original_configure(obj, *args, **kw)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py", line 51, in configure
    hive(name='hiveserver2')
  File "/usr/lib/ambari-agent/lib/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 310, in hive
    jdbc_connector(params.hive_jdbc_target, params.hive_previous_jdbc_jar)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 527, in jdbc_connector
    content = DownloadSource(params.driver_curl_source))
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 123, in action_create
    content = self._get_content()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 160, in _get_content
    return content()
  File "/usr/lib/ambari-agent/lib/resource_management/core/source.py", line 52, in __call__
    return self.get_content()
  File "/usr/lib/ambari-agent/lib/resource_management/core/source.py", line 197, in get_content
    raise Fail("Failed to download file from {0} due to HTTP error: {1}".format(self.url, str(ex)))
resource_management.core.exceptions.Fail: Failed to download file from http://ip-172-31-44-126.us-west-2.compute.internal:8080/resources/mysql-connector-java.jar due to HTTP error: HTTP Error 404: Not Found
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hive 2 Server Not Staring

Mentor

@Knows NotMuch

When you install HDP and you don't intend to use the derby database as in most cases with MySQL you download mysql-connector-java.jar thats one of the preparatory steps on the node where you will be running Hive etc

# yum install -y mysql-connector-java

The location is /usr/share/java/mysql-connector-java.jar and when running the Ambari setup the jdbc location must be appended

# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar 

Once you have done the above then Hive, Oozie,Ranger etc will function correctly

Please have a look at this HCC How to Sync MySQL Connector jar across HDP components and validate that you didn't miss a step.

If you found this answer addressed your question, please take a moment to log in and click the "Accept" link on the answer.

3 REPLIES 3

Re: Hive 2 Server Not Staring

Mentor

@Knows NotMuch

When you install HDP and you don't intend to use the derby database as in most cases with MySQL you download mysql-connector-java.jar thats one of the preparatory steps on the node where you will be running Hive etc

# yum install -y mysql-connector-java

The location is /usr/share/java/mysql-connector-java.jar and when running the Ambari setup the jdbc location must be appended

# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar 

Once you have done the above then Hive, Oozie,Ranger etc will function correctly

Please have a look at this HCC How to Sync MySQL Connector jar across HDP components and validate that you didn't miss a step.

If you found this answer addressed your question, please take a moment to log in and click the "Accept" link on the answer.

Re: Hive 2 Server Not Staring

Rising Star

when I try this command the setup doesn't complete

sudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/home/ubuntu/mysql-connector-java.jar

Using python /usr/bin/python Setup ambari-server Copying /home/ubuntu/mysql-connector-java.jar to /var/lib/ambari-server/resources If you are updating existing jdbc driver jar for mysql with mysql-connector-java.jar. Please remove the old driver jar, from all hosts. Restarting services that need the driver, will automatically copy the new jar to the hosts. JDBC driver was successfully initialized. Ambari Server 'setup' completed successfully

It says setup is successful. but it doesn't do any setup. just comes out. when I do `ambari-server setup` then it runs the setup but after the configuration of the cluster many services don't start because they cannot find the mysql-connector-java.jar

Re: Hive 2 Server Not Staring

Mentor

@Knows NotMuch

That's exactly the desired output "Ambari Server 'setup' completed successfully". Now if you start your hive 2server you shouldn't get the previous error.

Please let me know after attempting the H2S startup.

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