Kafka连接服务器出现Connection to node 1 (localhost127.0.0.19092) could not be establish



Kafka连接服务器出现:Connection to node 1

(localhost/127.0.0.1:9092) could not be established.「建议

收藏」

1

解决问题

2  修改server.properties的两行默认配置,即可通过外网连接服务器Kafka,问题解决:
3  # 允许外部端口连接
4  listeners=PLAINTEXT://0.0.0.0:9092
5  # 外部代理地址
6  advertised.listeners=PLAINTEXT://自己ip:9092