记一笔,莫名其妙出现了报错,排查了半天,终于解决了,结果真是有些无语。
报错日志
org.apache.dubbo.rpc.RpcException: Failed to invoke the method selectAllDeploySinkGteUpdateTime in the service com.cw.metagross.common.service.TranslatorConfigService. Tried 3 times of the providers [0:0:0:0:0:0:0:1:20881] (1/1) from the registry 10.0.10.44:8848 on the consumer 10.0.2.62 using the dubbo version 2.7.8. Last error is: Failed to invoke remote method: selectAllDeploySinkGteUpdateTime, provider: dubbo://0:0:0:0:0:0:0:1:20881/com.cw.metagross.common.service.TranslatorConfigService?anyhost=true&application=data-reorg&category=providers&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&init=false&interface=com.cw.metagross.common.service.TranslatorConfigService&metadata-type=remote&methods=selectAllDeploySinkGteUpdateTime,selectAllGteUpdateTime&path=com.cw.metagross.common.service.TranslatorConfigService&pid=85207&protocol=dubbo&qos.accept.foreign.ip=false&qos.enable=false®ister.ip=10.0.2.62&release=2.7.8&remote.application=webapp&side=consumer&sticky=false×tamp=1661323514659, cause: message can not send, because channel is closed . url:dubbo://0:0:0:0:0:0:0:1:20881/com.cw.metagross.common.service.TranslatorConfigService?anyhost=true&application=data-reorg&category=providers&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&init=false&interface=com.cw.metagross.common.service.TranslatorConfigService&metadata-type=remote&methods=selectAllDeploySinkGteUpdateTime,selectAllGteUpdateTime&path=com.cw.metagross.common.service.TranslatorConfigService&pid=85207&protocol=dubbo&qos.accept.foreign.ip=false&qos.enable=false®ister.ip=10.0.2.62&release=2.7.8&remote.application=webapp&side=consumer&sticky=false×tamp=1661323514659
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:113)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:260)
at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:88)
at org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker.doInvoke(ZoneAwareClusterInvoker.java:103)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:260)
at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:74)
at org.apache.dubbo.common.bytecode.proxy0.selectAllDeploySinkGteUpdateTime(proxy0.java)
at com.cw.metagross.datareorg.scheduling.SinkConfigScheduler.scheduling(SinkConfigScheduler.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.dubbo.remoting.RemotingException: message can not send, because channel is closed . url:dubbo://0:0:0:0:0:0:0:1:20881/com.cw.metagross.common.service.TranslatorConfigService?anyhost=true&application=data-reorg&category=providers&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&heartbeat=60000&init=false&interface=com.cw.metagross.common.service.TranslatorConfigService&metadata-type=remote&methods=selectAllDeploySinkGteUpdateTime,selectAllGteUpdateTime&path=com.cw.metagross.common.service.TranslatorConfigService&pid=85207&protocol=dubbo&qos.accept.foreign.ip=false&qos.enable=false®ister.ip=10.0.2.62&release=2.7.8&remote.application=webapp&side=consumer&sticky=false×tamp=1661323514659
at org.apache.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:176)
at org.apache.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:53)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:135)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:95)
at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:91)
at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:105)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:163)
at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:52)
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:89)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:51)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:69)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:83)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
... 25 more
解决方案
1.排查Nacos服务列表中,provider和consumer是否正常注册。未注册,说明你的nacos server或者client的配置有问题
2.检查一下自己有没有开代理。我是打开了Clashx, 它把我的本地网络代理掉了。