com.alibaba.dubbo.rpc.RpcException: No provider available from registry stable.zk.scsite.net:21异常解决
程序员文章站
2022-07-15 14:28:26
...
原文链接:
https://copyfuture.com/blogs-details/20200629181409555v24mc4magq748ni
最近发现dubbo消费端一直报下面这样的error日志
06-17 15:56:50.749 ERROR default - [orSendTimer-thread-1] c.alibaba.dubbo.monitor.dubbo.DubboMonitor : [DUBBO] Unexpected error occur at send statistic, cause: No provider available from registry *.*.*.*:端口 for service com.alibaba.dubbo.monitor.MonitorService on consumer 172.*.*.124 use dubbo version 2.8.3, please check status of providers(disabled, not registered or in blacklist)., dubbo version: 2.8.3, current host: 172.*.*.124
com.alibaba.dubbo.rpc.RpcException: No provider available from registry stable.zk.scsite.net:2181 for service com.alibaba.dubbo.monitor.MonitorService on consumer 172.*.*.124 use dubbo version 2.8.3, please check status of providers(disabled, not registered or in blacklist).
at com.alibaba.dubbo.registry.integration.RegistryDirectory.doList(RegistryDirectory.java:577)
at com.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory.list(AbstractDirectory.java:74)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.list(AbstractClusterInvoker.java:271)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:232)
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75)
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:77)
at com.alibaba.dubbo.common.bytecode.proxy19.collect(proxy19.java)
at com.alibaba.dubbo.monitor.dubbo.DubboMonitor.send(DubboMonitor.java:127)
at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$1.run(DubboMonitor.java:72)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
该个error对项目的功能没有任何影响,但反复的报错也是让人心烦,那么就解决吧。
原因
没有启动监控中心,却配了监控地址。
解决方案
- 把监控中心启动
- 把xml配置中的<dubbo:monitor protocol=“registry”>
- properties配置中的dubbo.monitor.protocol=registry去掉
dubbo:monitor
监控中心配置。对应的配置类: org.apache.dubbo.config.MonitorConfig
属性 | 对应URL参数 | 类型 | 是否必填 | 缺省值 | 作用 | 描述 | 兼容性 |
---|---|---|---|---|---|---|---|
protocol | protocol | string | 可选 | dubbo | 服务治理 | 监控中心协议,如果为protocol=“registry”,表示从注册中心发现监控中心地址,否则直连监控中心。 | 2.0.9以上版本 |
address | string | 可选 | N/A | 服务治理 | 直连监控中心服务器地址,address=“10.20.130.230:12080” | 1.0.16以上版本 |
上一篇: SSLOJ 1230.序列
下一篇: JVM内存模型及垃圾回收机制