原创

搭建dubbo服务框架时,提供者ip错误

        DUBBO是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,是阿里巴巴SOA服务化治理方案的核心框架,每天为2,000+个服务提供3,000,000,000+次访问量支持,并被广泛应用于阿里巴巴集团的各成员站点。


dubbo获取的ip错误后,程序报如下异常:

2016-06-03 19:25:56,268 WARN [com.alibaba.dubbo.remoting.transport.AbstractClient] -  [DUBBO] client reconnect to 10.174.246.27:20885 find error . url: dubbo://10.174.246.27:20885/com.soft.portal.service.api.IPortal?anyhost=true&application=ecs-sale-service&check=false&codec=dubbo&dubbo=2.5.4-SNAPSHOT&generic=false&heartbeat=60000&interface=com.soft.portal.service.api.IPortal&loadbalance=roundrobin&methods=ruleengine,cover,initDownload,underwriting&pid=3724&revision=1.0.1-SNAPSHOT&side=consumer&timeout=100000&timestamp=1464953149151, dubbo version: 2.5.3, current host: 192.168.0.119
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://10.174.246.27:20885/com.soft.portal.service.api.IPortal?anyhost=true&application=ecs-sale-service&check=false&codec=dubbo&dubbo=2.5.4-SNAPSHOT&generic=false&heartbeat=60000&interface=com.soft.portal.service.api.IPortal&loadbalance=roundrobin&methods=ruleengine,cover,initDownload,underwriting&pid=3724&revision=1.0.1-SNAPSHOT&side=consumer&timeout=100000&timestamp=1464953149151) failed to connect to server /10.174.246.27:20885 client-side timeout 3000ms (elapsed: 3002ms) from netty client 192.168.0.119 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$1.run(AbstractClient.java:145)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
ccc2016-06-03 19:40:52,395 ERROR [com.alibaba.dubbo.remoting.transport.AbstractClient] -  [DUBBO] client reconnect to 10.174.246.27:20885 find error . url: dubbo://10.174.246.27:20885/com.soft.portal.service.api.IPortal?anyhost=true&application=ecs-sale-service&check=false&codec=dubbo&dubbo=2.5.4-SNAPSHOT&generic=false&heartbeat=60000&interface=com.soft.portal.service.api.IPortal&loadbalance=roundrobin&methods=ruleengine,cover,initDownload,underwriting&pid=3724&revision=1.0.1-SNAPSHOT&side=consumer&timeout=100000&timestamp=1464953149151, dubbo version: 2.5.3, current host: 192.168.0.119
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://10.174.246.27:20885/com.soft.portal.service.api.IPortal?anyhost=true&application=ecs-sale-service&check=false&codec=dubbo&dubbo=2.5.4-SNAPSHOT&generic=false&heartbeat=60000&interface=com.soft.portal.service.api.IPortal&loadbalance=roundrobin&methods=ruleengine,cover,initDownload,underwriting&pid=3724&revision=1.0.1-SNAPSHOT&side=consumer&timeout=100000&timestamp=1464953149151) failed to connect to server /10.174.246.27:20885 client-side timeout 3000ms (elapsed: 3003ms) from netty client 192.168.0.119 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$1.run(AbstractClient.java:145)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)

在 dubbo.properties 配置文件中增加 dubbo.protocol.host=192.168.0.123,问题即可解决。

关注下方微信公众号“Java精选”(w_z90110),回复关键字领取资料:如HadoopDubboCAS源码等等,免费领取资料视频和项目。 

涵盖:程序人生、搞笑视频、算法与数据结构、黑客技术与网络安全、前端开发、Java、Python、Redis缓存、Spring源码、各大主流框架、Web开发、大数据技术、Storm、Hadoop、MapReduce、Spark、elasticsearch、单点登录统一认证、分布式框架、集群、安卓开发、iOS开发、C/C++、.NET、Linux、Mysql、Oracle、NoSQL非关系型数据库、运维等。

评论

分享:

支付宝

微信