老师,我的连接超时了
# 具体遇到的问题
这是我的命令 ./bin/zkCli.sh -server 39.97.251.11:2181 显示连接超时,没有显示welcome to Zookeeper
代码中的是连接超时显示的信息
# 报错信息的截图
# 相关课程内容截图
# 尝试过的解决思路和结果
# 粘贴全部相关代码,切记添加代码注释(请勿截图)
在这里输入代码,可通过选择【代码语言】突出显示
java.net.ConnectException: 连接超时
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:342)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1262)
2020-11-06 09:21:20,252 [myid:39.97.251.11:2181] - INFO [main-SendThread(39.97.251.11:2181):ClientCnxn$SendThread@1154] - Opening socket connection to server 39.97.251.11/39.97.251.11:2181.
2020-11-06 09:21:20,253 [myid:39.97.251.11:2181] - INFO [main-SendThread(39.97.251.11:2181):ClientCnxn$SendThread@1156] - SASL config status: Will not attempt to authenticate using SASL (unknown error)
2020-11-06 09:21:27,252 [myid:39.97.251.11:2181] - WARN [main-SendThread(39.97.251.11:2181):ClientCnxn$SendThread@1272] - Session 0x0 for sever 39.97.251.11/39.97.251.11:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: 连接超时
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:342)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1262)
2020-11-06 09:21:28,354 [myid:39.97.251.11:2181] - INFO [main-SendThread(39.97.251.11:2181):ClientCnxn$SendThread@1154] - Opening socket connection to server 39.97.251.11/39.97.251.11:2181.
2020-11-06 09:21:28,354 [myid:39.97.251.11:2181] - INFO [main-SendThread(39.97.251.11:2181):ClientCnxn$SendThread@1156] - SASL config status: Will not attempt to authenticate using SASL (unknown error)
22
收起
正在回答
2回答
同学你好,
1、同学检查一下zookeeper启动成功了没有,如下:
./bin/Server.sh status
2、关闭防火墙
systemctl stop firewalld.service
再连接试试
java工程师2020版
- 参与学习 人
- 提交作业 9400 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星