重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
最初的错误:
神木ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联建站的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:13518219792(备注:SSL证书合作)期待与您的合作!
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.(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(其他机器顺序配置),重启,问题解决!