kafka 远程连接消息推送 出现java.net.UnknownHostException

找到server.properties添加配置将ip暴漏出去


############################# Zookeeper #############################

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
# 需要添加advertised.listeners将ip暴漏给外网
advertised.listeners=PLAINTEXT://192.168.1.111:9092
zookeeper.connect=localhost:2181
posted @ 2022-05-20 11:20  Seasky-null  阅读(194)  评论(0)    收藏  举报