Kafka Spout ERROR

时间:2016-05-11 06:36:26

标签: java logging apache-kafka apache-storm hortonworks-data-platform

大家好,希望你做得好! Plz帮助我解决这个错误我什么都不懂 我在使用storm和kafka进行实时处理时使用hortonworks沙箱,当我部署拓扑并使用Kafka生产者发送数据时我可以使用Kafka控制台消费者读取它但我在我的风暴UI上收到此错误!

java.lang.NoSuchMethodError: kafka.javaapi.consumer.SimpleConsumer.<init>(Ljava/lang/String;IIILjava/lang/String;Ljava/lang/String;)V at storm.kafka.DynamicPartitionConnections.register(DynamicPartit

当我查看日志时,我得到了这个

2016-05-11 05:55:47.707 b.s.util [ERROR] Async loop died!
java.lang.NoSuchMethodError: kafka.javaapi.consumer.SimpleConsumer.<init>(Ljava/lang/String;IIILjava/lang/String;Ljava/lang/String;)V
    at storm.kafka.DynamicPartitionConnections.register(DynamicPartitionConnections.java:60) ~[stormjar.jar:?]
    at storm.kafka.PartitionManager.<init>(PartitionManager.java:66) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) ~[stormjar.jar:?]
    at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:138) ~[stormjar.jar:?]
    at backtype.storm.daemon.executor$fn__7177$fn__7192$fn__7221.invoke(executor.clj:596) ~[storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:475) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]
2016-05-11 05:55:47.713 b.s.d.executor [ERROR] 
java.lang.NoSuchMethodError: kafka.javaapi.consumer.SimpleConsumer.<init>(Ljava/lang/String;IIILjava/lang/String;Ljava/lang/String;)V
    at storm.kafka.DynamicPartitionConnections.register(DynamicPartitionConnections.java:60) ~[stormjar.jar:?]
    at storm.kafka.PartitionManager.<init>(PartitionManager.java:66) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) ~[stormjar.jar:?]
    at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:138) ~[stormjar.jar:?]
    at backtype.storm.daemon.executor$fn__7177$fn__7192$fn__7221.invoke(executor.clj:596) ~[storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:475) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]
2016-05-11 05:55:47.749 b.s.util [ERROR] Halting process: ("Worker died")
java.lang.RuntimeException: ("Worker died")
    at backtype.storm.util$exit_process_BANG_.doInvoke(util.clj:332) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.6.0.jar:?]
    at backtype.storm.daemon.worker$fn__7818$fn__7819.invoke(worker.clj:636) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.daemon.executor$mk_executor_data$fn__7078$fn__7079.invoke(executor.clj:256) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:485) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]

2016-05-11 05:55:59.156 b.s.util [ERROR] Async loop died!
java.lang.NoSuchMethodError: kafka.javaapi.consumer.SimpleConsumer.<init>(Ljava/lang/String;IIILjava/lang/String;Ljava/lang/String;)V
    at storm.kafka.DynamicPartitionConnections.register(DynamicPartitionConnections.java:60) ~[stormjar.jar:?]
    at storm.kafka.PartitionManager.<init>(PartitionManager.java:66) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) ~[stormjar.jar:?]
    at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:138) ~[stormjar.jar:?]
    at backtype.storm.daemon.executor$fn__7177$fn__7192$fn__7221.invoke(executor.clj:596) ~[storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:475) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]
2016-05-11 05:55:59.162 b.s.d.executor [ERROR] 
java.lang.NoSuchMethodError: kafka.javaapi.consumer.SimpleConsumer.<init>(Ljava/lang/String;IIILjava/lang/String;Ljava/lang/String;)V
    at storm.kafka.DynamicPartitionConnections.register(DynamicPartitionConnections.java:60) ~[stormjar.jar:?]
    at storm.kafka.PartitionManager.<init>(PartitionManager.java:66) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) ~[stormjar.jar:?]
    at storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) ~[stormjar.jar:?]
    at storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:138) ~[stormjar.jar:?]
    at backtype.storm.daemon.executor$fn__7177$fn__7192$fn__7221.invoke(executor.clj:596) ~[storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:475) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]
2016-05-11 05:55:59.195 b.s.util [ERROR] Halting process: ("Worker died")
java.lang.RuntimeException: ("Worker died")
    at backtype.storm.util$exit_process_BANG_.doInvoke(util.clj:332) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.6.0.jar:?]
    at backtype.storm.daemon.worker$fn__7818$fn__7819.invoke(worker.clj:636) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.daemon.executor$mk_executor_data$fn__7078$fn__7079.invoke(executor.clj:256) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at backtype.storm.util$async_loop$fn__544.invoke(util.clj:485) [storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_95]

感谢大家的帮助

1 个答案:

答案 0 :(得分:0)

检查pom中的堆栈版本和kafka版本。这是因为版本不匹配而发生的。