我正在进行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
可能是什么问题?请帮忙
答案 0 :(得分:1)
你应该在storm lib文件夹中有zkclient.jar。 http://repo1.maven.org/maven2/com/101tec/zkclient/0.1.0/zkclient-0.1.0.jar应该有效。否则你应该安装更高版本的jar。 Kafka使用zkclient与Zookeeper进行通信。顺便说一下,你应该去Kafka 0.8.0,因为它有复制。