You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Pradeep Bhadani (JIRA)" <ji...@apache.org> on 2015/03/03 17:24:04 UTC

[jira] [Commented] (AMBARI-9616) Hive service check error (MySQL syntex error)

    [ https://issues.apache.org/jira/browse/AMBARI-9616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345273#comment-14345273 ] 

Pradeep Bhadani commented on AMBARI-9616:
-----------------------------------------

Replace the mysql-connector jar at two location : /usr/share/java , /usr/hdp/2.2.0.0-2041/hive/lib/ and update the symlink.
Then restart the hive service from Ambari UI and hive should work.

I had the same issue and worked in this way.



> Hive service check error (MySQL syntex error)
> ---------------------------------------------
>
>                 Key: AMBARI-9616
>                 URL: https://issues.apache.org/jira/browse/AMBARI-9616
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 1.7.0
>         Environment: Ambari 1.7
> Existed MySQL Database at version 5.6.23
> Using mysql-connector-java-5.1.17.jar as the connector
>            Reporter: robinlin
>
> Hi,
> When I was install Hive, I choose existed MySQL DB(5.6.23), and the driver I provide at the step "ambari-server setup" is mysql-connector-java-5.1.34.jar.
> But when I looked into {code}/usr/share/java{code}, the mysql jdbc driver was always at the version 5.1.17, even only few components were installed, such as HDFS, YARN.
> When I ran the Hive service check, an error happened, and the message said,
> {code}
> 2015-02-06 03:33:12,220 - Error while executing command 'service_check':
> 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 "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/service_check.py", line 50, in service_check
>     hcat_service_check()
>   File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/services/HIVE/package/scripts/hcat_service_check.py", line 48, in hcat_service_check
>     logoutput=True)
>   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 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_67 /var/lib/ambari-agent/data/tmp/hcatSmoke.sh hcatsmokeid5c8cef19_date280615 prepare' returned 64. 15/02/06 03:31:53 WARN conf.HiveConf: HiveConf of name hive.optimize.mapjoin.mapreduce does not exist
> 15/02/06 03:31:53 WARN conf.HiveConf: HiveConf of name hive.heapsize does not exist
> 15/02/06 03:31:53 WARN conf.HiveConf: HiveConf of name hive.server2.enable.impersonation does not exist
> 15/02/06 03:31:53 WARN conf.HiveConf: HiveConf of name hive.auto.convert.sortmerge.join.noconditionaltask does not exist
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/hive/lib/hive-jdbc-0.14.0.2.2.0.0-2041-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
> 	at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
> 	at org.datanucleus.api.jdo.JDOPersistenceManager.getDataStoreConnection(JDOPersistenceManager.java:2259)
> 	at org.apache.hadoop.hive.metastore.MetaStoreDirectSql.trySetAnsiQuotesForMysql(MetaStoreDirectSql.java:169)
> {code}.
> I have tried the connector at version 5.1.34, it is ok.
> How can I switch the driver to 5.1.34, because I also tested it works normally with the MySQL 5.1.73 which is the database I find in the HDP2.2 sandbox.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)