• 安装Hive-0.10.0-CDH4.5.0所遇异常


    Note: 虚拟机访问Win7中mysql(root用户+密码)

    hive出现异常1:

    FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

    详细内容如下:

    hive> show tables;

    出现了下面的问题:

    FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

    FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClientFAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

    Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "DBCP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.

    用下面的命令,重新启动hive

    bin/hive -hiveconf hive.root.logger=DEBUG,console

    hive> show tables;

    能够看到更深层次的原因的是:

    Caused by: org.datanucleus.store.rdbms.datasource.DatastoreDriverNotFoundException: The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.

    (reason: 在hive安装目录中mysql-connector-java-5.1.25-bin.jar未下载,下载后放入${HIVE_HOME/lib中异常解除})
     at org.datanucleus.store.rdbms.datasource.AbstractDataSourceFactory.loadDriver(AbstractDataSourceFactory.java:58)
     at org.datanucleus.store.rdbms.datasource.DBCPDataSourceFactory.makePooledDataSource(DBCPDataSourceFactory.java:55)
     at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.java:217)
     ... 78 more

    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 18:49:46 ERROR ql.Driver: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 18:49:46 INFO ql.Driver: </PERFLOG method=Driver.execute start=1400032183641 end=1400032186358 duration=2717>
    14/05/13 18:49:46 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 18:49:46 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400032186358 end=1400032186358 duration=0>
    14/05/13 18:49:46 INFO exec.ListSinkOperator: 0 finished. closing...
    14/05/13 18:49:46 INFO exec.ListSinkOperator: 0 forwarded 0 rows
    14/05/13 18:49:46 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 18:49:46 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400032186378 end=1400032186385 duration=7>

    hive出现异常2:

    Caused by: java.sql.SQLException: The connection property 'useUnicode' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true;characterEncoding=UTF-8' is not in this set.
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
     at com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.validateStringValues(ConnectionPropertiesImpl.java:311)
     at com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty.initializeFrom(ConnectionPropertiesImpl.java:99)
     at com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.initializeFrom(ConnectionPropertiesImpl.java:210)
     at com.mysql.jdbc.ConnectionPropertiesImpl.initializeProperties(ConnectionPropertiesImpl.java:2817)
     at com.mysql.jdbc.ConnectionImpl.initializeDriverProperties(ConnectionImpl.java:3490)

    ................................
     at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:768)
     ... 57 more

    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 19:14:53 ERROR ql.Driver: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 19:14:53 INFO ql.Driver: </PERFLOG method=Driver.execute start=1400033691830 end=1400033693611 duration=1781>
    14/05/13 19:14:53 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 19:14:53 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400033693611 end=1400033693611 duration=0>
    14/05/13 19:14:53 INFO exec.ListSinkOperator: 0 finished. closing...
    14/05/13 19:14:53 INFO exec.ListSinkOperator: 0 forwarded 0 rows
    14/05/13 19:14:53 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 19:14:53 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400033693660 end=1400033693661 duration=1>

    hive出现异常3:

    Caused by: java.net.ConnectException: Connection refused

    (reason:mysql服务器在Ubuntu下没有安装-> sudo apt-get install mysql-server)
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
     at java.net.Socket.connect(Socket.java:579)
     at java.net.Socket.connect(Socket.java:528)
     at java.net.Socket.<init>(Socket.java:425)
     at java.net.Socket.<init>(Socket.java:241)
     at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259)
     at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:307)
     ... 86 more

    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 19:20:31 ERROR ql.Driver: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    14/05/13 19:20:31 INFO ql.Driver: </PERFLOG method=Driver.execute start=1400034030865 end=1400034031926 duration=1061>
    14/05/13 19:20:31 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 19:20:31 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400034031926 end=1400034031926 duration=0>
    14/05/13 19:20:31 INFO exec.ListSinkOperator: 0 finished. closing...
    14/05/13 19:20:31 INFO exec.ListSinkOperator: 0 forwarded 0 rows
    14/05/13 19:20:31 INFO ql.Driver: <PERFLOG method=releaseLocks>
    14/05/13 19:20:31 INFO ql.Driver: </PERFLOG method=releaseLocks start=1400034031939 end=1400034031943 duration=4>

    hive出现异常4:

    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Access denied for user 'root'@'gc.localdomain' (using password: YES)

    NestedThrowables:

    java.sql.SQLException: Access denied for user 'root'@'gc.localdomain' (using password: YES)

    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

     Solution:

    mysql> grant all on hive.* to root@' gc.localdomain' identified by 'hivepwd';

  • 相关阅读:
    MS SQL入门基础:SQL数据库中的事务
    MS SQL入门基础:删除数据
    MS SQL入门基础:触发器的高级应用
    MS SQL入门基础:SQL Server 安全性管理的途径
    MS SQL入门基础:权限管理
    MS SQL入门基础:打开游标
    MS SQL入门基础:数据库更新添加数据
    MS SQL入门基础:游标、游标的优点和种类
    MS SQL入门基础:创建和管理视图
    MS SQL入门基础:数据库中的连接查询
  • 原文地址:https://www.cnblogs.com/likai198981/p/3727189.html
Copyright © 2020-2023  润新知