@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)
我刚碰到这个问题。。我这边目前是开启zookeeper后 在开启一个终端 之后开启kafka 之后再开启一个终端就可以了。。不知道是不是守护进程的问题。。是kafka连不上zookeeper了。请检查server.properties中zookeeper.connect是否配置正确。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。