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

1688

被折叠的 条评论
为什么被折叠?



