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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是kafka连不上zookeeper了。请检查server.properties 中zookeeper.connect是否配置正确。
我刚碰到这个问题。。我这边目前是开启zookeeper后 在开启一个终端 之后开启kafka 之后再开启一个终端就可以了。。不知道是不是守护进程的问题。。