kafka 远程连接本地 java.net.UnknownHostException
WARN [AdminClient clientId=adminclient-1] Error connecting to node computerXU.mshome.net:9092 (id: 0 rack: null) (org.apache.kafka.clients.NetworkClient)java.net.UnknownHostException: computerXU.mshom
·
WARN [AdminClient clientId=adminclient-1] Error connecting to node computerXU.mshome.net:9092 (id: 0 rack: null) (org.apache.kafka.clients.NetworkClient)
java.net.UnknownHostException: computerXU.mshome.net
at java.net.InetAddress.getAllByName0(InetAddress.java:1281)
解决: kafka 的server.properties 添加advertised.listeners参数配置
advertised.listeners=PLAINTEXT://192.168.1.1:9092 //对外暴露的外网ip或局域内网IP,不是本地ip
zookeeper.connect=localhost:2181 //必须localhost
更多推荐
已为社区贡献1条内容
所有评论(0)