fiware cosmos配置单元授权问题

avkwfej4  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(353)

我使用的是fiware cosmos的共享示例(这意味着我没有root权限)。到目前为止,我已经成功地使用jdbc和hivecli远程访问和管理了hive中的表。但现在在启动hive cli时出现以下错误:

log4j:ERROR Could not instantiate class [org.apache.hadoop.hive.shims.HiveEventCounter].
java.lang.RuntimeException: Could not load shims in class org.apache.hadoop.log.metrics.EventCounter
    at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:123)
    at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:115)
    at org.apache.hadoop.hive.shims.ShimLoader.getEventCounter(ShimLoader.java:98)
    at org.apache.hadoop.hive.shims.HiveEventCounter.<init>(HiveEventCounter.java:34)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:357)
    at java.lang.Class.newInstance(Class.java:310)
    at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:330)
    at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:121)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:664)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
    at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:354)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jDefault(LogUtils.java:127)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:77)
    at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:641)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:197)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:171)
    at org.apache.hadoop.hive.shims.ShimLoader.createShim(ShimLoader.java:120)
    ... 27 more
log4j:ERROR Could not instantiate appender named "EventCounter".

Logging initialized using configuration in jar:file:/usr/local/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties

但是,我可以在配置单元cli中执行选择和创建。如果我尝试远程访问hive,我会得到以下结果:

Connecting to jdbc:hive://x.x.x.x:10000/default?user=user&password=XXXXXXXXXX
Could not establish connection: java.net.ConnectException: Connection refused

在出现错误之前,我没有对代码或命令做任何更改,在谷歌搜索之后,我也没有找到任何有效的解决方案。
如果有人能引导我找到问题所在,或者如何找到问题,或者更好地解决问题,我将不胜感激。
提前谢谢!

qgzx9mmu

qgzx9mmu1#

hiveserver2(hivejdbc服务)是一个非常不稳定的软件。在我们的prod集群中,我们每天都有一个cron作业来重新启动每个示例,即使这样,有时它也会抛出内存错误,然后挂起 Connection refused 就像你展示的那样。打开一张hadoop管理员的票证,让他/她重新启动该死的服务。
另一方面 org.apache.hadoop.log.metrics.EventCounter 消息闻起来像是有人试图更改某个地方的共享配置(或者试图升级一些jar),现在hive认为它运行在非常非常旧的hadoop版本上
=>例如,hive-4133或mapr支持帖子中的评论

a9wyjsp7

a9wyjsp72#

这些问题的起因是宇宙中Hive的升级。更详尽的解释和解决方案如下:
我的hive客户端停止使用cosmos示例

相关问题