您好,登錄后才能下訂單哦!
最初的錯誤:
DynamicBrokersReader [ERROR] Node /brokers/ids/0 does not exist
設置:
BrokerHosts brokerHosts = new ZkHosts(zks, "/kafka/brokers");
然后就是如下錯誤:
2016-04-13T15:07:10.657+0800 b.s.util [ERROR] Async loop died! java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /kafka/brokers/topics/testtopic/partitions at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:81) ~[storm-kafka-0.9.6.jar:0.9.6] at storm.kafka.trident.ZkBrokerReader.<init>(ZkBrokerReader.java:42) ~[storm-kafka-0.9.6.jar:0.9.6] at storm.kafka.KafkaUtils.makeBrokerReader(KafkaUtils.java:57) ~[storm-kafka-0.9.6.jar:0.9.6] at storm.kafka.KafkaSpout.open(KafkaSpout.java:87) ~[storm-kafka-0.9.6.jar:0.9.6] at backtype.storm.daemon.executor$fn__3371$fn__3386.invoke(executor.clj:529) ~[storm-core-0.9.6.jar:0.9.6] at backtype.storm.util$async_loop$fn__460.invoke(util.clj:461) ~[storm-core-0.9.6.jar:0.9.6] at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_38] Caused by: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /kafka/brokers/topics/testtopic/partitions at storm.kafka.DynamicBrokersReader.getNumPartitions(DynamicBrokersReader.java:94) ~[storm-kafka-0.9.6.jar:0.9.6] at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:65) ~[storm-kafka-0.9.6.jar:0.9.6] ... 7 common frames omitted
分析發現,在
DynamicBrokersReader類中雖然讀取的是zkPath但是,前面的連接地址已經有了前綴地址,所以后面不用再加上
去掉了還是報最初的錯誤,再分析
在zkCli.sh進入zookeeper后檢查,確實沒有0,只有1,2,3這是在配置kafka時就定義的id了
在kafka/config/server.properties中配置broker.id = 0(其他機器順序配置),重啟,問題解決!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。