启动kafka报错

 

启动kafka时 报错:

kafka-console-consumer.sh --from-beginning --zookeeper node01:8121,node02:8121,node03:8121 --topic log_monitor
Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zookeeper].
[2019-08-04 10:03:45,906] WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.ConnectException: Connection refused

将zk端口号修改为9092,报另一个错误:

[2019-08-04 10:04:17,647] WARN Client session timed out, have not heard from server in 10006ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
[2019-08-04 10:04:28,461] WARN Client session timed out, have not heard from server in 10004ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
[2019-08-04 10:04:39,418] WARN Client session timed out, have not heard from server in 10001ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
No brokers found in ZK.

 

原因:检查发现是zk的端口号写错了,写成了8121,或者 9092。

解决方法:将端口号修改为2181. 

 

转载于:https://www.cnblogs.com/mediocreWorld/p/11297393.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值