weixin_36952403 2017-03-01 01:47 采纳率: 100%
浏览 5267
已采纳

dubbo整合spring,连接失败

用的是普通的web工程,linux上的zookeeper也已经启动了。运行测试类的main方法就会报下面的错误
错误如下:
2017-03-01 09:36:54,249 WARN [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-03-01 09:36:56,356 WARN [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

  • 写回答

1条回答 默认 最新

  • weixin_36952403 2017-03-01 03:51
    关注

    已经解决了,是registry时的address写错了,应该写成linux的ip

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?