java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClie

1、启动hive的时候出现这个问题,报错如下所示:

 1 [hadoop@slaver1 conf]$ hive
 2 
 3 Logging initialized using configuration in jar:file:/home/hadoop/soft/hive-0.13.1-cdh5.3.6/lib/hive-common-0.13.1-cdh5.3.6.jar!/hive-log4j.properties
 4 Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
 5     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:371)
 6     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689)
 7     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
 8     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 9     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
10     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11     at java.lang.reflect.Method.invoke(Method.java:606)
12     at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
13 Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
14     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1426)
15     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
16     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
17     at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2625)
18     at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2644)
19     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:365)
20     ... 7 more
21 Caused by: java.lang.reflect.InvocationTargetException
22     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
23     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
24     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
25     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
26     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1424)
27     ... 12 more
28 Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
29     at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
30     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:351)
31     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:219)
32     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
33     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
34     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
35     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
36     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1424)
37     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
38     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
39     at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2625)
40     at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2644)
41     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:365)
42     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689)
43     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
44     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
45     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
46     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
47     at java.lang.reflect.Method.invoke(Method.java:606)
48     at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
49 Caused by: java.net.ConnectException: Connection refused
50     at java.net.PlainSocketImpl.socketConnect(Native Method)
51     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
52     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
53     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
54     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
55     at java.net.Socket.connect(Socket.java:579)
56     at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
57     ... 19 more
58 )
59     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:398)
60     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:219)
61     ... 17 more

2、具体原因是我配置hive的hive.site.sh的时候配置了如下所示的内容,注释了就不报错了,这里先注释了:

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏一个会写诗的程序员的博客

Spring Boot集成Security使用数据库用户角色权限用户名问题问题描述原因分析解决方案

sql语法手误。1?这地方写错了,应该是?1。这在敲代码的时候,手速一旦稍有不慎,就会导致前后顺序颠倒,而导致输入错误。这个虽然说是“低级错误”,但是错误搞起来...

1026
来自专栏逆向与安全

菜鸟 学注册机编写之 “RSA”

选取两个别人不知道的大素数p, q. 公共模n = p*q 欧拉值φ(n) = (p-1)(q-1) 选取公匙(加密匙) e , 条件是1< e <φ(n...

1780
来自专栏函数式编程语言及工具

FunDA(11)- 数据库操作的并行运算:Parallel data processing

   FunDA最重要的设计目标之一就是能够实现数据库操作的并行运算。我们先重温一下fs2是如何实现并行运算的。我们用interleave、merge、eith...

1988
来自专栏码匠的流水账

聊聊reactor extra的retry

reactor-extra-3.1.4.RELEASE-sources.jar!/reactor/retry/Retry.java

1601
来自专栏大数据-Hadoop、Spark

【Hive】ERROR exec.DDLTask: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32.nati...

1/在$HADOOP_HOME/lib/native下面放了2.5.0-native-snappy.tar.gz,这是HDFS存储压缩所需的本地lib包。 c...

1072
来自专栏Flutter入门

SDL2库(3)-Android 端源码简要分析(VideoSubSystem)参考

项目位置 https://github.com/deepsadness/SDLCmakeDemo

2514
来自专栏数据结构与算法

HDU 4786Fibonacci Tree(最小生成树)

Problem Description   Coach Pang is interested in Fibonacci numbers while Un...

3856
来自专栏码匠的流水账

聊聊resilience4j的Retry

resilience4j-retry-0.13.0-sources.jar!/io/github/resilience4j/retry/Retry.java

2531
来自专栏向治洪

获取手机短信内容

原理是通过,contentprovider获取系统短信数据库中的字段信息而达到获取内容目的 效果图如下: ? 具体代码如下: package com.inter...

2188
来自专栏IT笔记

quartz部署Table 'heart_beat.QRTZ_LOCKS' doesn't exist

项目由win系统部署到linux系统下,启动项目报错如下: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSy...

1.4K5

扫码关注云+社区

领取腾讯云代金券