maven工程是ssm写的 端口用的是zookeeper的默认端口2181 <!-- 使用dubbo发布服务 --> <!-- 提供方应用信息,用于计算依赖关系 --> <dubbo:application name="e3-manager" /> <dubbo:registry protocol="zookeeper" address="192.168.0.106:2182" /> <!-- 用dubbo协议在20880端口暴露服务 --> <dubbo:protocol name="dubbo" port="20880" /> <!-- 声明需要暴露的服务接口 --> <dubbo:service interface="cn.e3mall.service.ItemService" ref="itemServiceImpl" timeout="60000"/> <dubbo:service interface="cn.e3mall.service.ItemCatService" ref="itemCatServiceImpl" timeout="60000"/> 自从我用360体检清扫电脑后(代码没动过,其他配置啥的都没动过),服务就发布不上去了 一启动zookeeper显示 2\WindowsPowerShell\v1.0\;D:\nginx-1.8.0;C:\Users\whx\Anaconda3;C:\Users\whx\Anaconda3\Library\mingw-w64\bin;C:\Users\whx\Anaconda3\Library\usr\bin;C:\Users\whx\Anaconda3\Library\bin;C:\Users\whx\Anaconda3\Scripts;C:\Users\whx\AppData\Local\Microsoft\WindowsApps;D:\nginx-1.8.0;;. 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:java.io.tmpdir=C:\Users\whx\AppData\Local\Temp\ 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:java.compiler=<NA> 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Windows 10 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:os.version=10.0 2018-02-15 12:04:49,450 [myid:] - INFO [main:Environment@100] - Server environment:user.name=whx 2018-02-15 12:04:49,465 [myid:] - INFO [main:Environment@100] - Server environment:user.home=C:\Users\whx 2018-02-15 12:04:49,465 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=D:\zookeeper-3.4.6\bin 2018-02-15 12:04:49,481 [myid:] - INFO [main:ZooKeeperServer@755] - tickTime set to 2000 2018-02-15 12:04:49,481 [myid:] - INFO [main:ZooKeeperServer@764] - minSessionTimeout set to -1 2018-02-15 12:04:49,481 [myid:] - INFO [main:ZooKeeperServer@773] - maxSessionTimeout set to -1 2018-02-15 12:04:49,861 [myid:] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181 2018-02-15 12:04:50,967 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /127.0.0.1:60176 2018-02-15 12:04:50,982 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@841] - Refusing session request for client /127.0.0.1:60176 as it has seen zxid 0x2 our last zxid is 0x0 client must try another server 2018-02-15 12:04:50,982 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /127.0.0.1:60176 (no session established for client) 在dubbo上查看service也找不到发布的服务 查看2181端口 显示 C:\Windows\System32>netstat -aon|findstr "2181" TCP 0.0.0.0:2181 0.0.0.0:0 LISTENING 4768 TCP 127.0.0.1:2181 127.0.0.1:60223 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60225 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60226 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60227 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60228 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60230 TIME_WAIT 0 TCP 127.0.0.1:2181 127.0.0.1:60231 TIME_WAIT 0 后来我试过改变zookeeper的启动端口成2181,启动zookeeper就不会 一直显示拒绝客户请求Refusing session request for client 但是maven工程服务还是发布不上去 Local\Temp\ 2018-02-15 12:52:34,020 [myid:] - INFO [main:Environment@100] - Server environment:java.compiler=<NA> 2018-02-15 12:52:34,024 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Windows 10 2018-02-15 12:52:34,025 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64 2018-02-15 12:52:34,026 [myid:] - INFO [main:Environment@100] - Server environment:os.version=10.0 2018-02-15 12:52:34,031 [myid:] - INFO [main:Environment@100] - Server environment:user.name=whx 2018-02-15 12:52:34,032 [myid:] - INFO [main:Environment@100] - Server environment:user.home=C:\Users\whx 2018-02-15 12:52:34,033 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=D:\zookeeper-3.4.6\bin 2018-02-15 12:52:34,045 [myid:] - INFO [main:ZooKeeperServer@755] - tickTime set to 2000 2018-02-15 12:52:34,047 [myid:] - INFO [main:ZooKeeperServer@764] - minSessionTimeout set to -1 2018-02-15 12:52:34,048 [myid:] - INFO [main:ZooKeeperServer@773] - maxSessionTimeout set to -1 2018-02-15 12:52:34,400 [myid:] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2182