storm1.1.0+kafka0.10.2.1:nosuchmethoderror和exceptionininitializererror

c6ubokkw  于 2021-06-08  发布在  Kafka
关注(0)|答案(2)|浏览(365)

我是新来的风暴和Kafka。我想运行一个开源软件project:github:cestella:streaming_outliers
本项目使用storm0.10.0。但是,我的storm群集是storm1.0.3,它不适用于storm0.10.0。
所以,我必须更改storm的版本和一些相关的包。
然后,当我运行这个拓扑时,它会出现以下错误。
java.lang.nosuchmethoderror:org.apache.kafka.common.network.networksend.(ljava/lang/string;ljava/nio/bytebuffer;)v在kafka.network.requestorresponsesend。scala:41)在kafka.network.requestorresponsesend。scala:44)在kafka.network.blockingchannel.send(blockingchannel。scala:112)在kafka.consumer.simpleconsumer.liftedtree1$1(simpleconsumer。scala:98)在kafka.consumer.simpleconsumer.kafka$consumer$simpleconsumer$$sendrequest(simpleconsumer。scala:83)在kafka.consumer.simpleconsumer.getoffsetsbefore(simpleconsumer。scala:149)在kafka.javaapi.consumer.simpleconsumer.getoffsetsbefore(simpleconsumer。scala:79)在org.apache.storm.kafka.kafkautils.getoffset(kafkautils。java:75)在org.apache.storm.kafka.kafkautils.getoffset(kafkautils。java:65)在org.apache.storm.kafka.partitionmanager。java:103)在org.apache.storm.kafka.zkcoordinator.refresh(zkcoordinator。java:98)在org.apache.storm.kafka.zkcoordinator.getmymanagedpartitions(zkcoordinator。java:69)在org.apache.storm.kafka.kafkaspout.nexttuple(kafkaspout。java:129)在org.apache.storm.daemon.executor$fn\uuu4905$fn\uuu4920$fn\uuu4951.invoke(executor。clj:644)在org.apache.storm.util$async\u loop$fn\u 557.invoke(util。clj:484)在clojure.lang.afn.run(afn。java:22)在java.lang.thread.run(线程。java:745)

kafka.metrics.kafkametricsgroup$class.newtimer(kafkametricsgroup。scala:90)在kafka.consumer.fetchrequestandresponsemetrics.newtimer(fetchrequestandresponsestats。scala:26)在kafka.consumer.fetchrequestandresponsemetrics.(fetchrequestandresponsestats。scala:35)在kafka.consumer.fetchrequestandresponsestats.(fetchrequestandresponsestats。scala:47)在kafka.consumer.fetchrequestandresponsestats注册$$anonfun$2.apply(fetchrequestandresponsestats)。scala:60)在kafka.consumer.fetchrequestandresponsestats注册$$anonfun$2.apply(fetchrequestandresponsestats)。scala:60)在kafka.utils.pool$$anonfun$getandmaybeput$1.apply(池。scala:52)在kafka.utils.pool.getandmaybeput(pool。scala:70)在kafka.utils.pool.getandmaybeput(pool。scala:52)在kafka.consumer.fetchrequestandresponsestats注册$.getfetchrequestandresponsestats(fetchrequestandresponsestats)。scala:64)在Kafka。消费者。简单消费者。(简单消费者。scala:44) 在kafka.javaapi.consumer.simpleconsumer.(simpleconsumer。scala:34)在org.apache.storm.kafka.dynamicpartitionconnections.register(dynamicpartitionconnections)上。java:60)在org.apache.storm.kafka.partitionmanager。java:74)在org.apache.storm.kafka.zkcoordinator.refresh(zkcoordinator。java:98)在org.apache.storm.kafka.zkcoordinator.getmymanagedpartitions(zkcoordinator。java:69)在org.apache.storm.kafka.kafkaspout.nexttuple(kafkaspout。java:129)在org.apache.storm.daemon.executor$fn\uuu4905$fn\uuu4920$fn\uuu4951.invoke(executor。clj:644)在org.apache.storm.util$async\u loop$fn\u 557.invoke(util。clj:484)在clojure.lang.afn.run(afn。java:22)在java.lang.thread.run(线程。java:745)原因:java.lang.illegalstateexception:正在java.lang.applicationshutdownhooks.add(applicationshutdownhooks)上关闭。java:66)在java.lang.runtime.addshutdownhook(runtime。java:211)在com.yammer.metrics.metrics.(metrics。java:21) ... 21个以上

net.opentsdb.utils.config.getboolean(config。java:354)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config.loadstaticvariables(config。java:620)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config.setdefaults(config。java:532)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config。java:131)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler$tsdbconfig.(tsdbhandler。java:127)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler$tsdbconfig。java:124)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler.configure(tsdbhandler。java:144)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.outlier.outlierbolt.prepare(outlierbolt。java:63)~[stormjar]。jar:1.6.6]在org.apache.storm.daemon.executor$fn\uuu4973$fn\uuu4986.invoke(executor。clj:791)~[风暴核心-1.0.3。jar:1.0.3]在org.apache.storm.util$async\u loop$fn\u 557.invoke(util。clj:482)[风暴核心-1.0.3。jar:1.0.3]java.lang.nullpointerexception位于net.opentsdb.utils.config.getboolean(配置。java:354)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config.loadstaticvariables(config。java:620)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config.setdefaults(config。java:532)~[stormjar]。jar:1.6.6]在net.opentsdb.utils.config。java:131)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler$tsdbconfig.(tsdbhandler。java:127)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler$tsdbconfig。java:124)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.timeseries.tsdb.tsdbhandler.configure(tsdbhandler。java:144)~[stormjar]。jar:1.6.6]在com.caseystella.analytics.outlier.outlierbolt.prepare(outlierbolt。java:63)~[stormjar]。jar:1.6.6]在org.apache.storm.daemon.executor$fn\uuu4973$fn\uuu4986.invoke(executor。clj:791)~[风暴核心-1.0.3。jar:1.0.3]在org.apache.storm.util$async\u loop$fn\u 557.invoke(util。clj:482)[风暴核心-1.0.3。jar:1.0.3]
以下是软件包的版本。
Kafka版本:0.10.2.1
Kafka客户端版本:0.10.2.1
storm\u版本:1.1.0
风暴Kafka版本:1.1.0
flux\u版本:1.1.0
tsdb\ U版本:2.3.0
互联网上有一些方法说,附加kafka客户机的依赖关系可以解决第一个错误。但是,它不起作用。
谢谢。

t5zmwmid

t5zmwmid1#

pom.xml中的kafka和kafka客户端版本应该相互匹配。

<dependency>
  <groupId>org.apache.kafka</groupId>
  <artifactId>kafka_2.12</artifactId>
  <version>1.0.0</version>
</dependency>

<dependency>
  <groupId>org.apache.kafka</groupId>
  <artifactId>kafka-clients</artifactId>
  <version>1.0.0</version>
</dependency>
xienkqul

xienkqul2#

当应用程序包含同一jar的多个版本(例如kafka 0.10.2.1和0.10.0.1)时,不会出现这种方法错误。检查您的项目依赖项并删除较旧版本的jar。

相关问题