ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)

启动kafka的时候报错,找了很久,特以此记录。

[2020-05-15 10:09:12,476] INFO EventThread shut down for session: 0x2000090777d0001 (org.apache.zookeeper.ClientCnxn)
[2020-05-15 10:09:12,478] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)
[2020-05-15 10:09:12,482] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply$mcV$sp(ZooKeeperClient.scala:268)
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:264)
        at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:264)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
        at kafka.zookeeper.ZooKeeperClient.kafka$zookeeper$ZooKeeperClient$$waitUntilConnected(ZooKeeperClient.scala:264)
        at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:97)
        at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1693)
        at kafka.server.KafkaServer.kafka$server$KafkaServer$$createZkClient$1(KafkaServer.scala:348)
        at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:372)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:202)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
        at kafka.Kafka$.main(Kafka.scala:75)
        at kafka.Kafka.main(Kafka.scala)
[2020-05-15 10:09:12,484] INFO shutting down (kafka.server.KafkaServer)
[2020-05-15 10:09:12,492] INFO shut down completed (kafka.server.KafkaServer)
[2020-05-15 10:09:12,492] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2020-05-15 10:09:12,495] INFO shutting down (kafka.server.KafkaServer)

我一直在纠结于这个错误。

ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)

最后才看到下面这行,显示zookeeper连接超时

kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection

然后我修改了一下server.properties文件里的超时时间,就ok了

zookeeper.connection.timeout.ms=60000
  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值