Solve Kafka"Failed to send messages after 3 tries"

本文介绍了解决Kafka中‘Failed to send messages after 3 tries’错误的方法。通过编辑Kafka服务器上的server.properties文件,取消注释并设置advertised.host.name及advertised.port属性,分别指定Kafka服务器的IP地址和端口,从而确保客户端能够正确连接到Kafka服务器。

ISSUES “Failed to send messages after 3 tries”

Edit server.properties located in KafKa Server:

  • uncomment advertised.host.name and assign kafka server’s IP
# Hostname the broker will advertise to producers and consumers. If not set, it uses the
# value for "host.name" if configured.  Otherwise, it will use the value returned from
# java.net.InetAddress.getCanonicalHostName().
advertised.host.name=xx.xx.xxx.xxx                  
  • uncomment advertised.port and assign kafka server’s port
# The port to publish to ZooKeeper for clients to use. If this is not set,
# it will publish the same port that the broker binds to.
advertised.port=9092

than u can try to send the message again.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值