kafka0.8启动报错

发布于 2021-11-26 12:25:52 字数 3130 浏览 743 评论 2

@FrankHui 你好,想跟你请教个问题:我在Centos上安装单机kafka0.8的时候报错,向您请教下原因。

zookeeper启动时没有问题,当kafka启动时报如下的错:
zookeeper日志报错如下:
[2013-11-15 16:28:19,433] INFO Established session 0x1425adc68520000 with negotiated timeout 6000 for client /127.0.0.1:56568 (org.apache.zookeeper.server.NIOServerCnxn)
[2013-11-15 16:28:19,541] INFO Got user-level KeeperException when processing sessionid:0x1425adc68520000 type:create cxid:0x1 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers/ids Error:KeeperErrorCode = NoNode for /brokers/ids (org.apache.zookeeper.server.PrepRequestProcessor)
[2013-11-15 16:28:19,571] INFO Got user-level KeeperException when processing sessionid:0x1425adc68520000 type:create cxid:0x2 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)
[2013-11-15 16:28:19,878] INFO Got user-level KeeperException when processing sessionid:0x1425adc68520000 type:setData cxid:0xb zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/controller_epoch Error:KeeperErrorCode = NoNode for /controller_epoch (org.apache.zookeeper.server.PrepRequestProcessor)

kafka日志报错如下:
[2013-11-15 17:12:28,434] ERROR Error while electing or becoming leader on broker 0 (kafka.server.ZookeeperLeaderElector)
java.net.ConnectException: Connection timed out
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:364)
at sun.nio.ch.Net.connect(Net.java:356)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:623)
at kafka.network.BlockingChannel.connect(BlockingChannel.scala:57)
at kafka.controller.ControllerChannelManager.kafka$controller$ControllerChannelManager$$addNewBroker(ControllerChannelManager.scala:84)
at kafka.controller.ControllerChannelManager$$anonfun$1.apply(ControllerChannelManager.scala:35)
at kafka.controller.ControllerChannelManager$$anonfun$1.apply(ControllerChannelManager.scala:35)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:81)
at kafka.controller.ControllerChannelManager.<init>(ControllerChannelManager.scala:35)
at kafka.controller.KafkaController.startChannelManager(KafkaController.scala:503)
at kafka.controller.KafkaController.initializeControllerContext(KafkaController.scala:467)
at kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:215)
at kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:89)
at kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:53)
at kafka.server.ZookeeperLeaderElector$LeaderChangeListener.handleDataDeleted(ZookeeperLeaderElector.scala:106)
at org.I0Itec.zkclient.ZkClient$6.run(ZkClient.java:549)
at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
[2013-11-15 17:12:28,447] INFO 0 successfully elected as leader (kafka.server.ZookeeperLeaderElector)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

英雄似剑 2021-11-29 06:43:44

是kafka连不上zookeeper了。请检查server.properties 中zookeeper.connect是否配置正确。

别再吹冷风 2021-11-29 02:48:56

我刚碰到这个问题。。我这边目前是开启zookeeper后  在开启一个终端 之后开启kafka  之后再开启一个终端就可以了。。不知道是不是守护进程的问题。。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文