问题描述
调用Dubbo服务报以下错误,跪求问题原因和解决办法
Caused by: com.alibaba.dubbo.remoting.RemotingException: message can not send, because channel is closed . url:dubbo://192.168.17.71:21954/com.tw.ei.business.agent.service.ReqBuinessAgentService?anyhost=true&application=consumer-engine&check=false&codec=dubbo&default.timeout=120000&dubbo=2.4.10&heartbeat=60000&interface=com.tw.ei.business.agent.service.ReqBuinessAgentService&methods=execute&pid=27587&retries=0&revision=reqappservice&side=consumer×tamp=1399973540550&version=1.0.0
at com.alibaba.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:268)
at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:51)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:112)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:81)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)
at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)
at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)
... 10 more
解决方案
Caused by: com.alibaba.dubbo.remoting.RemotingException: message can not send, because channel is closed .
通道关闭:一开始以为项目没发布,deploy后还是不行,仔细一想没发布不应该提示通道关闭。
1、查看服务端是否正常运行,服务端配置的端口是否正确;
2、dubbo对外发布接口正常;
3、端口是否开放、域名是否解析、网络是否通畅;
通常:
一般是网络不通(比如服务端的ip ping不通,或者可以ping通但是配置的端口有问题,导致服务端服务无法访问),从服务消费方到服务提供方网络问题。
其他可能
provider返回的时候 发现调用provider的线程已经被关闭了 有可能是consumer 的timeout设得太短了。
转自:https://blog.csdn.net/u014756578/article/details/80167357