报错内容如下:
java -jar dubbo-admin-0.0.1-SNAPSHOT.jar想要运行打好的jar包,报错如下:
2022-02-11 15:32:54.876 WARN 16252 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnectjava.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_311] at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.8.0_311] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.8.jar!/:3.4.8--1] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) ~[zookeeper-3.4.8.jar!/:3.4.8--1] INFO zookeeper.ZookeeperRegistry - [DUBBO] Retry subscribe {admin://192.168.254.1?category=providers,consumers,routers,configurators&check=false&classifier=*&enabled=*&group=*&interface=*&version=*=[com.alibaba.dubboadmin.governance.sync.RegistryServerSync@1faa8caa]}, dubbo version: 2.6.2, current host: 192.168.254.12022-02-11 15:32:55.996 INFO 16252 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 127.0.0.1/127.0.0.1:2181、Will not attempt to authenticate using SASL (unknown error)
解决方法:
需要先打开zookeeper,怎么打开,找到你的zookeeper,点击bin目录下的zkServer.cmd,运行起来后!!不要关闭!然后再去运行以下你的jar包!!!
就这么一个问题我整个一个半小时,来自菜鸟的暴风哭泣!!