专栏首页别先生java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClie

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 条评论
登录 后参与评论

相关文章

  • java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory

    1、启动项目报出这个错误,未找到响应的包,所以需要你将包从远程仓库下载到本地仓库即可。

    别先生
  • springboot 使用 freemarker 无法正常跳转的问题?

    参考:https://blog.csdn.net/Lin_xiaofeng/article/details/79122053

    别先生
  • 一脸懵逼学习Hive的安装(将sql语句翻译成MapReduce程序的一个工具)

    Hive只在一个节点上安装即可: 1.上传tar包:这个上传就不贴图了,贴一下上传后的,看一下虚拟机吧: ? 2.解压操作: [root@slaver3...

    别先生
  • Hive 编程专题之 - 自定义函数 Java 篇

    内建函数针对不同的数据类型有分成很多种,字符函数,数值函数,日期函数,转换函数等;

    Lenis
  • 【报错总结】无法连接Hive的MetaStore数据库

    【报错原因】未启动HiveMetaStore服务。 【解决方法】 step1. 因为配置HiveMetaStore存储在MySQL数据库中,所以需要先启动M...

    魏晓蕾
  • springboot 使用 freemarker 无法正常跳转的问题?

    参考:https://blog.csdn.net/Lin_xiaofeng/article/details/79122053

    别先生
  • maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

    maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plu...

    MonroeCode
  • maven build时报错

    可能原因有很多个,  1. maven私服连不上了, 有一些jar包没有下载到本地, 或者是私服的路径配置错误

    MonroeCode
  • 详述 IntelliJ IDEA 遇到 Maven 项目打开(Open)或者导入(Import)失败的解决方法

    现有一个 Maven 项目,通过 IntelliJ IDEA 的Open或者Import Project来打开或者导入该项目:

    CG国斌
  • java.lang.IllegalStateException: getOutputStream() has already been called for this response

    https://stackoverflow.com/questions/33982515/handlerinterceptor-getoutputstream-...

    一个会写诗的程序员

扫码关注云+社区

领取腾讯云代金券