一个头疼的事:kafka和zookeeper,部署在一台服务器,zookeeper正常启动,配置也没任何问题。但是kafka就是报错(内容如下).
ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
配置文件检查好几遍没有错,防火墙也没有开,zookeeper正常启动,配置的都是内网。终于,也是瞎猫碰死耗子,修改了kafka连接zookeeper的超时时间,然后居然启动了!!!配置内容如下:
# root directory for all kafka znodes.
zookeeper.connect=10.0.1.219:2181
# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=18000 #修改这里,时间改的长一些
希望可以帮助到大家!!
版权归原作者 All_bitter 所有, 如有侵权,请联系我们删除。