error backtype.storm.daemon.executor-java.lang.noclassdeffounderror:org/i0itec/zkclient/serialize/zkserializer

nqwrtyyt  于 2021-06-07  发布在  Kafka
关注(0)|答案(1)|浏览(304)

我做Kafka风暴集成和执行风暴代码时,我得到这个错误

ERROR backtype.storm.util - Async loop died!
java.lang.NoClassDefFoundError: org/I0Itec/zkclient/serialize/ZkSerializer
at kafka.api.OffsetRequest.writeTo(OffsetRequest.scala:65) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.network.BoundedByteBufferSend.<init>(BoundedByteBufferSend.scala:43) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.sendRequest(SimpleConsumer.scala:171) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.liftedTree3$1(SimpleConsumer.scala:152) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:151) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.javaapi.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:66) ~[kafka_2.9.2-0.7.0.jar:na]
at storm.kafka.PartitionManager.<init>(PartitionManager.java:73) ~[kafka-1.1.jar:na]
at storm.kafka.StaticCoordinator.<init>(StaticCoordinator.java:26) ~[kafka-1.1.jar:na]
at storm.kafka.KafkaSpout.open(KafkaSpout.java:74) ~[kafka-1.1.jar:na]
at backtype.storm.daemon.executor$fn__3489$fn__3504.invoke(executor.clj:499) ~[storm-0.9.0-wip15.jar:na]
at backtype.storm.util$async_loop$fn__436.invoke(util.clj:375) ~[storm-0.9.0-wip15.jar:na]
at clojure.lang.AFn.run(AFn.java:24) [clojure-1.4.0.jar:na]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Caused by: java.lang.ClassNotFoundException: org.I0Itec.zkclient.serialize.ZkSerializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_51]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_51]
... 13 common frames omitted
5083 [Thread-26] ERROR backtype.storm.daemon.executor - 
   java.lang.NoClassDefFoundError: org/I0Itec/zkclient/serialize/ZkSerializer
at kafka.api.OffsetRequest.writeTo(OffsetRequest.scala:65) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.network.BoundedByteBufferSend.<init>(BoundedByteBufferSend.scala:43) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.sendRequest(SimpleConsumer.scala:171) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.liftedTree3$1(SimpleConsumer.scala:152) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:151) ~[kafka_2.9.2-0.7.0.jar:na]
at kafka.javaapi.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:66) ~[kafka_2.9.2-0.7.0.jar:na]
at storm.kafka.PartitionManager.<init>(PartitionManager.java:73) ~[kafka-1.1.jar:na]
at storm.kafka.StaticCoordinator.<init>(StaticCoordinator.java:26) ~[kafka-1.1.jar:na]
at storm.kafka.KafkaSpout.open(KafkaSpout.java:74) ~[kafka-1.1.jar:na]
at backtype.storm.daemon.executor$fn__3489$fn__3504.invoke(executor.clj:499) ~[storm-0.9.0-wip15.jar:na]
at backtype.storm.util$async_loop$fn__436.invoke(util.clj:375) ~[storm-0.9.0-wip15.jar:na]
at clojure.lang.AFn.run(AFn.java:24) [clojure-1.4.0.jar:na]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Caused by: java.lang.ClassNotFoundException: org.I0Itec.zkclient.serialize.ZkSerializer
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_51]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_51]
... 13 common frames omitted
5090 [Thread-13-EventThread] INFO  backtype.storm.zookeeper - Zookeeper state update:     :connected:none
5090 [Thread-10-EventThread] INFO  backtype.storm.zookeeper - Zookeeper state update:     :connected:none
5101 [Thread-13] INFO  com.netflix.curator.framework.imps.CuratorFrameworkImpl - Starting
5112 [Thread-10] INFO  com.netflix.curator.framework.imps.CuratorFrameworkImpl -     Starting
5204 [Thread-26] INFO  backtype.storm.util - Halting process: ("Worker died")

我的pom文件中没有zkclient
有什么问题吗?请帮忙

2izufjch

2izufjch1#

在storm lib文件夹中应该有zkclient.jar。http://repo1.maven.org/maven2/com/101tec/zkclient/0.1.0/zkclient-0.1.0.jar 应该有用。否则应该安装更高版本的jar。Kafka使用zkclient与zookeeper通信。顺便说一句,你应该去Kafka0.8.0,因为它有复制。

相关问题