dubbo - zookeeper连接报错

开始加载配置文件....
2013-04-02 14:21:42,764 WARN [main] ConfigUtils com.alibaba.dubbo.common.utils.ConfigUtils.loadProperties(ConfigUtils.java:236)- [DUBBO] No dubbo.properties found on the class path., dubbo version: 2.4.1, current host: 127.0.0.1
2013-04-02 14:21:54,459 ERROR [main] AbstractClient com.alibaba.dubbo.remoting.transport.AbstractClient.<init>(AbstractClient.java:113)- [DUBBO] Failed to start NettyClient PC-201212031615/192.168.1.163 connect to the server /192.168.1.87:20880 (check == false, ignore and retry later!), cause: client(url: dubbo://192.168.1.87:20880/com.wangku.dubbo.server.ScatterService?application=wangku-member-server&check=false&codec=dubbo&dubbo=2.4.1&dynamic=false&heartbeat=60000&interface=com.wangku.dubbo.server.ScatterService&methods=sysUserLogin&pid=7332&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1364883702789&weight=25) failed to connect to server /192.168.1.87:20880, error message is:Connection refused: no further information, dubbo version: 2.4.1, current host: 192.168.1.163
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.1.87:20880/com.wangku.dubbo.server.ScatterService?application=wangku-member-server&check=false&codec=dubbo&dubbo=2.4.1&dynamic=false&heartbeat=60000&interface=com.wangku.dubbo.server.ScatterService&methods=sysUserLogin&pid=7332&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1364883702789&weight=25) failed to connect to server /192.168.1.87:20880, error message is:Connection refused: no further information
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:123)
at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:281)
at com.alibaba.dubbo.remoting.transport.AbstractClient.<init>(AbstractClient.java:104)
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.<init>(NettyClient.java:61)
at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.connect(NettyTransporter.java:37)
at com.alibaba.dubbo.remoting.Transporter$Adpative.connect(Transporter$Adpative.java)
at com.alibaba.dubbo.remoting.Transporters.connect(Transporters.java:67)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.connect(HeaderExchanger.java:37)
at com.alibaba.dubbo.remoting.exchange.Exchangers.connect(Exchangers.java:102)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.initClient(DubboProtocol.java:377)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getSharedClient(DubboProtocol.java:343)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getClients(DubboProtocol.java:320)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.refer(DubboProtocol.java:302)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:62)
at com.alibaba.dubbo.rpc.Protocol$Adpative.refer(Protocol$Adpative.java)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.toInvokers(RegistryDirectory.java:395)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:224)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:195)
at com.alibaba.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:449)
at com.alibaba.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:273)
at com.alibaba.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:259)
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doSubscribe(ZookeeperRegistry.java:167)
at com.alibaba.dubbo.registry.support.FailbackRegistry.subscribe(FailbackRegistry.java:189)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:133)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:271)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:254)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:60)
at com.alibaba.dubbo.rpc.Protocol$Adpative.refer(Protocol$Adpative.java)
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:383)
at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:292)
at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138)
at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
at DubboClientTest.main(DubboClientTest.java:15)
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2013-04-02 14:21:56,400 WARN [DubboClientReconnectTimer-thread-1] AbstractClient com.alibaba.dubbo.remoting.transport.AbstractClient$1.run(AbstractClient.java:161)- [DUBBO] client reconnect to 192.168.1.87:20880 find error . url: dubbo://192.168.1.87:20880/com.wangku.dubbo.server.ScatterService?application=wangku-member-server&check=false&codec=dubbo&dubbo=2.4.1&dynamic=false&heartbeat=60000&interface=com.wangku.dubbo.server.ScatterService&methods=sysUserLogin&pid=7332&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1364883702789&weight=25, dubbo version: 2.4.1, current host: 192.168.1.163
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.1.87:20880/com.wangku.dubbo.server.ScatterService?application=wangku-member-server&check=false&codec=dubbo&dubbo=2.4.1&dynamic=false&heartbeat=60000&interface=com.wangku.dubbo.server.ScatterService&methods=sysUserLogin&pid=7332&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1364883702789&weight=25) failed to connect to server /192.168.1.87:20880, error message is:Connection refused: no further information
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:123)
at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:281)
at com.alibaba.dubbo.remoting.transport.AbstractClient$1.run(AbstractClient.java:146)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276)
... 3 more

 

 

 


解决办法:你把SimpleMonitor里面替换为zookeeper-3.4.2.jar,增加slf4j-api-1.6.1.jar和slf4j-log4j12-1.6.1.jar ,解决问题
将服务店的zookeeper改成zookeeper-3.4.2版本wget http://www.apache.org/dist//zookeeper/zookeeper-3.4.2/zookeeper-3.4.2.tar.gz

posted @ 2016-09-05 10:37  wangkejun  阅读(16064)  评论(0编辑  收藏  举报