Dubbo由于连接不上monitor监控中心报错

com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. No provider available for the service com.alibaba.dubbo.monitor.MonitorService from registry localhost:2181 on the consumer 10.23.144.194 using the dubbo version 2.6.2. Please check if the providers have been started and registered.
    at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:257) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:56) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:238) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.common.bytecode.proxy0.collect(proxy0.java) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.monitor.dubbo.DubboMonitor.send(DubboMonitor.java:112) ~[dubbo-2.6.2.jar:2.6.2]
    at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$1.run(DubboMonitor.java:69) ~[dubbo-2.6.2.jar:2.6.2]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_80]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_80]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_80]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]

解决方案:
这是因为没有启动监控中心,却配了监控地址,把监控中心启动,或者把xml配置中的<dubbo:monitor protocol="registry"></dubbo:monitor>或properties配置中的dubbo.monitor.protocol=registry去掉,即可。

相关文章

此处评论已关闭