admin管理员组文章数量:1608625
问题:
kafka启动正常,发送消息时报错
Connection with /x.x.x.x:x disconnected java.ConnectException: Connection refused: no further information
分析:
分析个毛线,跑脚本模拟一下:
发送
消费
啊哦, 脚本没有问题
那看来时地址设置的错了,打开config/server.properties
#listeners=PLAINTEXT://:9092
zookeeper.connect=localhost:2181
修改如下:
listeners=PLAINTEXT://:9999
zookeeper.connect=内网ip:2181
顺手改了以下三个(不需要改,我是因为端口不是默认的)
connect-standalone.properties
consumer.properties
producer.properties
bootstrap.servers=内网ip:9999
重启broker, 测试 ok了
解决:
server.properties中
listeners=PLAINTEXT://:你的对外端口
zookeeper.connect=你的内网ip:2181
consumer.properties/ producer.properties中
bootstrap.servers=你的内网ip:你的对外端口
本文标签: NETJavadisconnectedrefusedConnection
版权声明:本文标题:disconnected java.net.ConnectException: Connection refused: no further 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1728549779a1163281.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论