WARN Session 0x0 for server null,unexpected error,closing socket connection and attempting reconnect

WARN Session 0x0 for server null,unexpected error,closing socket connection and attempting reconnect,第1张

WARN Session 0x0 for server null,unexpected error,closing socket connection and attempting reconnect
Kafka报错异常解决
完整报错信息:
[2021-11-21 19:22:01,604] WARN Session 0x0 for server null, unexpected error, 
closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.net.NoRouteToHostException: 没有到主机的路由
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
如图所示:

通过报错信息可以得知,未连接到主机IP地址

原因:

主机ip地址修改后忘记修改你的配置文件中对应的ip地而造成的,如图所示:

可先使用命令查看IP地址:

ifconfig

再进入配置文件查看端口号,果不其然,与主机ip地址不符,如图所示:

修改配置文件中的ip地址为连接的主机ip后保存退出即可。

特别注意:若使用快捷方式启动需修改自己编写的文件中的ip哦

修改完成后再次查看所有topic,成功!!


如有错误,欢迎指正

Thanks 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zaji/5573139.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-14
下一篇 2022-12-14

发表评论

登录后才能评论

评论列表(0条)

保存