DUBBO启动报错找不到服务

ERROR 10:16:41,178 AbstractClient: - [DUBBO] Failed to start NettyClient caedmon-PC/192.168.0.234 connect to the server /60.191.124.236:21890 (check == false, ignore and retry later!), cause: client(url: dubbo://60.191.124.236:21890/com.sendinfo.ebiz3.account.server.UserServer?anyhost=true&application=wuzhen-b2c-provider&check=false&codec=dubbo&default.check=false&default.retries=0&default.timeout=20000&dubbo=2.5.3&heartbeat=60000&interface=com.sendinfo.ebiz3.account.server.UserServer&methods=queryConsumerPointVo,updateAccount,queryConsumer,updateLogin,loginOut,getLogin,regConsumer,getAccount,queryLogin,updateConsumer&pid=6212&side=consumer&timeout=5000&timestamp=1425544252633) failed to connect to server /60.191.124.236:21890 client-side timeout 3000ms (elapsed: 3003ms) from netty client 192.168.0.234 using dubbo version 2.5.3, dubbo version: 2.5.3, current host: 192.168.0.234
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://60.191.124.236:21890/com.sendinfo.ebiz3.account.server.UserServer?anyhost=true&application=wuzhen-b2c-provider&check=false&codec=dubbo&default.check=false&default.retries=0&default.timeout=20000&dubbo=2.5.3&heartbeat=60000&interface=com.sendinfo.ebiz3.account.server.UserServer&methods=queryConsumerPointVo,updateAccount,queryConsumer,updateLogin,loginOut,getLogin,regConsumer,getAccount,queryLogin,updateConsumer&pid=6212&side=consumer&timeout=5000&timestamp=1425544252633) failed to connect to server /60.191.124.236:21890 client-side timeout 3000ms (elapsed: 3003ms) from netty client 192.168.0.234 using dubbo version 2.5.3
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:127)
at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:280)
at com.alibaba.dubbo.remoting.transport.AbstractClient.(AbstractClient.java:103)
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.(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:378)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getSharedClient(DubboProtocol.java:344)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getClients(DubboProtocol.java:321)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.refer(DubboProtocol.java:303)
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.access$400(ZookeeperRegistry.java:45)
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry$3.childChanged(ZookeeperRegistry.java:159)
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$2.handleChildChange(ZkclientZookeeperClient.java:82)
at org.I0Itec.zkclient.ZkClient$8.run(ZkClient.java:583)
at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)

8个回答

IP是否是你本机IP,可能是因为找错IP了;
如果是这个原因的话将host绑定本机IP就OK
参考:http://www.iteye.com/news/23850

绑定本机IP,我的做法:在provider xml文件中加入本机host

 <!-- 用dubbo协议在20880端口暴露服务 -->  
<dubbo:protocol name="dubbo" host="10.3.41.6" port="20880" />  

参考:http://dubbo.io/User+Guide-zh.htm#UserGuide-zh-%E4%B8%BB%E6%9C%BA%E7%BB%91%E5%AE%9A

zhouxue12366
笨笨的_ 请教一下,如果这样绑定了host的话;那么集群的时候怎么处理呢?如果有100台不是要绑定100台了?会很蛋疼
2 年多之前 回复

找到问题了,服务器的dns设置不对

service network restart

可以注册到服务了

但是服务器ping不通外网了​

楼主问题解决了吗?我也遇到这个问题了

楼主咋解决的?我也遇到了这个问题

我也遇到了,不厚道的楼主,直接跑路

关键点:Failed to start NettyClient

是192.168.0.234 链接60.191.124.236:21890时失败,检查网络与防火墙,保证本地192.168.0.234 telnet 60.191.124.236 21890可以成功。

具体分析下网络问题。

在消费者配置文件中增加这个配置

我的是在自己电脑上运行的,改成host:127.0.0.1就好了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐