异常信息如下:
ERROR [DubboMonitorSendTimer-thread-1] - [DUBBO] Unexpected error occur at send statistic, cause: 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 192.168.1.17:2181 on the consumer 192.168.5.18 using the dubbo version 2.5.4. Please check if the providers have been started and registered., dubbo version: 2.5.4, current host: 192.168.5.18com.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 192.168.1.17:2181 on the consumer 192.168.5.18 using the dubbo version 2.5.4. Please check if the providers have been started and registered. at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:246) at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:55) at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227) at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72) at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) at com.alibaba.dubbo.common.bytecode.proxy3.collect(proxy3.java) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor.send(DubboMonitor.java:113) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$1.run(DubboMonitor.java:70) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
这是因为没有启动Dubbo的dubbo-monitor监控项目导致的。我们可以置之不理,如果看着不爽的话,就把dubbo-monitor工程下载下来,然后启动起来即可。(附件中是我下载的,可以按照下述方法安装即可http://pan.baidu.com/s/1bnLwBRT)
如果是window ,进入\dubbo-monitor-simple-2.5.3\conf 修改里面的dubbo.properties 文件:
dubbo.registry.address = xxx
更改为自己得dubbo-minitor注册路径即可
然后启动 start.bat,启动完成后,在浏览器上可以访问http://localhost:8081/