1.我先检查了虚拟机能不能ping

2.再检查了zookeeper有没有开启

3.又检查了数据库能不能连上

 

三项都没有问题

依旧出不来    信息: StartingProtocolHandler ["http-bio-8003"]




4.我在resource包里加了log4j文件,打出下边的错误

 

 

java.net.ConnectException:Connection timed out: no further information

atsun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

atsun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)

atorg.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)

atorg.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)

 

java.nio.channels.ClosedChannelException        

atsun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:819)        

atsun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:434)        

atorg.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)        

atorg.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)        

atorg.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)





原因:防火墙没关

 

运行 systemctl stop firewalld.service 关闭防火墙




成功!




Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐