更新时间:2022-11-27 11:04:51
在你的kafka server.properties
中有一个注释配置
In your kafka server.properties
there is a commented configuration
#advertised.host.name=<Some IP>
取消注释并添加运行kafka的Linux机器的IP。
Uncomment this and add the IP of the Linux Machine in which kafka is running.
advertised.host.name=<Kafka Running Machine IP>
从客户端连接到< Kafka Running Machine IP>
这应该可以解决您的问题。
And connect from clients to <Kafka Running Machine IP>
This should fix your issue.
编辑
您可以选择可以取消注释
Optionally you can uncomment the
#advertised.port=9092
此外,如果您正在侦听与默认端口不同的端口。
Also if you are listening on a different port than the default one.