开发者社区> 问答> 正文

kafka0.8启动报错?报错

@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)

展开
收起
爱吃鱼的程序员 2020-06-22 14:26:08 678 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    我刚碰到这个问题。。我这边目前是开启zookeeper后  在开启一个终端 之后开启kafka  之后再开启一个终端就可以了。。不知道是不是守护进程的问题。。是kafka连不上zookeeper了。请检查server.properties中zookeeper.connect是否配置正确。

    2020-06-22 14:26:26
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
MaxCompute技术公开课第四季 之 如何将Kafka数据同步至MaxCompute 立即下载
消息队列kafka介绍 立即下载