您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
最初的错误:
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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。