Created 10-13-2016 10:32 AM
I am using HDP 2.1. While restarting hive I am getting following error:-
2016-10-13 10:31:25,465 - Error while executing command 'restart': Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 123, in execute method(env) File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 233, in restart self.start(env) File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_metastore.py", line 45, in start action = 'start' File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py", line 64, in hive_service path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', tries=5, try_sleep=10) 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 241, in action_run raise ex Fail: Execution of '/usr/jdk64/jdk1.6.0_31/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification 'jdbc:mysql://test.xxx.com/hive?createDatabaseIfNotExist=true' hive [PROTECTED] com.mysql.jdbc.Driver' returned 1. ERROR: Unable to connect to the DB. Please check DB connection properties.
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Created 10-13-2016 10:48 AM
Thanks got the solution.
Done following steps:- Copied the mysql-connector.jar and issue is resolved
cp -r /usr/lib/hive/lib/mysql-connector-java.jar /usr/share/java/
Created 10-13-2016 10:48 AM
Thanks got the solution.
Done following steps:- Copied the mysql-connector.jar and issue is resolved
cp -r /usr/lib/hive/lib/mysql-connector-java.jar /usr/share/java/