分享

启动hive报错:Unable to instantiate org.apache.hadoop.hive.ql.metadata.Sessio...

xw2016 发表于 2016-5-6 20:19:17 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 8 58167
环境,hadoop2.6.0+zookeeper3.4.5+hbase1.0.3 jdk1.7
以上环境已安装好,启动成功,启动hive时报错,hive apache-hive-1.1.1-bin.tar.gz,执行./bin/hive,
错误日志如下:

16/05/05 21:47:15 WARN conf.HiveConf:HiveConf of name hive.exec.scratdir does not exist
16/05/05 21:47:15 WARN conf.HiveConf:HiveConf of name hive.metastore.local does not exist
Logging initialized using configuration infile:/application/hadoop/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4Jbindings.
SLF4J: Found binding in[jar:file:/application/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in[jar:file:/application/hadoop/hive/lib/hive-jdbc-1.1.1-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Actual binding is of type[org.slf4j.impl.Log4jLoggerFactory]
Exception in thread "main"java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiateorg.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
       atorg.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:472)
       at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)
       at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:606)
       at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

       at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

求解。

已有(8)人评论

跳转到指定楼层
langke93 发表于 2016-5-7 12:31:40
Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-0.14.0.jar!/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/hive-jdbc-0.14.0-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]
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
        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.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1449)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2661)
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2680)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
        ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
        ... 13 more
Caused by: javax.jdo.JDOFatalDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://Master:3306/hive?createDatabaseIfNotExist=true, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------


错误原因:当时我在问题描述一种,停止mysql服务之后修改root密码,之后没有重启mysql,虽然在主机上可以用  mysql  -uroot -padmin登陆,但是却拒绝远程链接,有人说是Mysql没有重启服务或链接超时。
解决方法:
    [root@Master ~]#/etc/init.d/mysql restart    #重启mysql服务
  或    [root@Master ~]# service mysql restart
     即可解决以上问题。




来自Centos6.5+Hive-0.14+mysql5.6搭建中异常信息解决
http://www.aboutyun.com/forum.php?mod=viewthread&tid=11131


回复

使用道具 举报

xw2016 发表于 2016-5-7 15:15:36
不行,重启了mysql还是报这个错。
回复

使用道具 举报

xw2016 发表于 2016-5-7 15:17:05
输入命令:
hive  --service metastore -hiveconf hive.root.logger=DEBUG,console
出一堆日志,然后卡住不动:
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Commit transaction: count = 0, isactive true at:
        org.apache.hadoop.hive.metastore.ObjectStore.addRole(ObjectStore.java:3211)
16/05/07 13:38:13 [main]: INFO metastore.HiveMetaStore: Added public role in metastore
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Open transaction: count = 1, isActive = true at:
        org.apache.hadoop.hive.metastore.ObjectStore.grantPrivileges(ObjectStore.java:3894)
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Open transaction: count = 2, isActive = true at:
        org.apache.hadoop.hive.metastore.ObjectStore.getMRole(ObjectStore.java:3509)
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Commit transaction: count = 1, isactive true at:
        org.apache.hadoop.hive.metastore.ObjectStore.getMRole(ObjectStore.java:3515)
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Open transaction: count = 2, isActive = true at:
        org.apache.hadoop.hive.metastore.ObjectStore.listPrincipalGlobalGrants(ObjectStore.java:4379)
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Commit transaction: count = 1, isactive true at:
        org.apache.hadoop.hive.metastore.ObjectStore.listPrincipalGlobalGrants(ObjectStore.java:4389)
16/05/07 13:38:13 [main]: DEBUG metastore.ObjectStore: Commit transaction: count = 0, isactive true at:
        org.apache.hadoop.hive.metastore.ObjectStore.grantPrivileges(ObjectStore.java:4094)
16/05/07 13:38:13 [main]: INFO metastore.HiveMetaStore: No user is added in admin role, since config is empty
16/05/07 13:38:14 [main]: INFO metastore.HiveMetaStore: Starting DB backed MetaStore Server with SetUGI enabled
16/05/07 13:38:14 [main]: INFO metastore.HiveMetaStore: Started the new metaserver on port [9083]...
16/05/07 13:38:14 [main]: INFO metastore.HiveMetaStore: Options.minWorkerThreads = 200
16/05/07 13:38:14 [main]: INFO metastore.HiveMetaStore: Options.maxWorkerThreads = 1000
16/05/07 13:38:14 [main]: INFO metastore.HiveMetaStore: TCP keepalive = true
Sat May 07 14:38:13 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sat May 07 14:38:13 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sat May 07 14:38:14 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sat May 07 14:38:14 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
回复

使用道具 举报

xw2016 发表于 2016-5-7 15:18:19
我重新打开一个连接,在bin下输入./hive,还是会报错:
[hadoop@yun01-nn-01 ~]$ hive
16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.exec.scratdir does not exist
16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

Logging initialized using configuration in file:/application/hadoop/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/application/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/application/hadoop/hive/lib/hive-jdbc-1.1.1-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]
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:472)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        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.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
回复

使用道具 举报

xw2016 发表于 2016-5-7 15:19:18
我重新打开一个连接,cd 到bin目录下,输入./hive,还是报这个错:

16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.exec.scratdir does not exist
16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

Logging initialized using configuration in file:/application/hadoop/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/application/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/application/hadoop/hive/lib/hive-jdbc-1.1.1-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]
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:472)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        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.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
回复

使用道具 举报

tntzbzc 发表于 2016-5-7 18:16:54
首先这里面存在两个问题:
1.jdbc的配置可能有问题
2.hbase1.x与hive1.x整合,需要编译hive1.x.否则不兼容。
楼主换下hive2.x
回复

使用道具 举报

tntzbzc 发表于 2016-5-7 21:37:35
16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.exec.scratdir does not exist
16/05/07 15:12:22 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

配置的是本地,还是远程hive

基本的配置要保证正确

回复

使用道具 举报

xw2016 发表于 2016-5-7 23:55:01
我重新发一个帖子吧,把详细步骤写出来,你们帮我看下哪里不对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条