dubbo-admin Failed to invoke remote method: getMetricsByGroup
Java Dubbo Spring Boot About 3,312 words截图
使用dubbo-admin
时,前端页面统计功能一直无法展示信息。
版本信息
- dubbo:2.7.3
- Spring Boot:2.1.6.RELEASE
- dubbo-spring-boot-starter:2.7.1
- dubbo-admin:develop分支
错误信息
dubbo-admin前端提示Not found exported service: org.apache.dubbo.monitor.MetricsService
System Error, please try again later! Message:Failed to invoke remote method: getMetricsByGroup, provider: dubbo://192.168.2.153:20880/org.apache.dubbo.monitor.MetricsService?application=dubbo-admin&cache=true&dubbo=2.0.2&interface=org.apache.dubbo.monitor.MetricsService&lazy=false&methods=getMetricsByGroup&pid=8560®ister.ip=192.168.2.153&remote.application=&revision=2.7.2&scope=remote&side=consumer&sticky=false×tamp=1564035344103, cause: org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.monitor.MetricsService:20880 in [dubbo/learn.dubbo.service.DemoService:1.0.0:20880], may be version or group mismatch , channel: consumer: /192.168.2.153:55418 --> provider: /192.168.2.153:20880, message:RpcInvocation [methodName=getMetricsByGroup, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=org.apache.dubbo.monitor.MetricsService, input=225, dubbo=2.0.2, interface=org.apache.dubbo.monitor.MetricsService, version=0.0.0}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.monitor.MetricsService:20880 in [dubbo/learn.dubbo.service.DemoService:1.0.0:20880], may be version or group mismatch , channel: consumer: /192.168.2.153:55418 --> provider: /192.168.2.153:20880, message:RpcInvocation [methodName=getMetricsByGroup, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=org.apache.dubbo.monitor.MetricsService, input=225, dubbo=2.0.2, interface=org.apache.dubbo.monitor.MetricsService, version=0.0.0}]
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:266)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:127)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:102)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:193)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
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)
解决方案
是否开启
consumer
消费者,如不开启也一直提示该错误(博主因为没有开启,浪费好多时间找原因)。是否添加
dubbo-monitor-default
依赖<dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-monitor-default</artifactId> <version>${dubbo.version}</version> </dependency>
Spring Boot工程是否开启
@EnableDubboConfig
注解@EnableDubboConfig //或者 @EnableDubboConfigBinding(prefix = "dubbo.metrics", type = MetricsConfig.class)
是否添加
metrics
和provider.filter
配置dubbo: metrics: protocol: dubbo port: 20880 provider: filter: metrics
参考
Views: 7,540 · Posted: 2019-07-25
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...