dubbo-spring-boot-starter 2.7.0 升级到 2.7.3遇到的第一个坑 org.apache.dubbo.remoting.RemotingException: Not fo

公司有一个分布式集群项目是采用zookeeper +dubbo 架构,因为一些需求需要升级dubbo-spring-boot-starter的版本,但是发现升级后报一个错

org.apache.dubbo.remoting.RemotingException: Not found exported service: com.dubbo.vba_api.service.xiaohe.XiaoheService:12345 in [com.dubbo.vba_api.service.xiaohe.XiaoheService:1.0.0:12345], may be version or group mismatch

接下来我便做出来了种种假设

1.我的代码原因,没有扫描到包

2.版本原因 

很快假设一很快被排除。

排除一后,我看了一下官网的dome,没有发现明显的区别,于是便按照官网的例子启动,发现也是不行,后经过几个小时排查终于发现日志有一点异常

org.apache.dubbo.remoting.RemotingException: Not found exported service: com.dubbo.vba_api.service.xiaohe.XiaoheService:12345 in [com.dubbo.vba_api.service.xiaohe.XiaoheService:1.0.0:12345], may be version or group mismatch , channel: consumer: /10.0.75.1:51571 --> provider: /10.0.75.1:12345, message:RpcInvocation [methodName=selectXioheOrderById, parameterTypes=[class java.lang.Integer], arguments=[null], attachments={path=com.dubbo.vba_api.service.xiaohe.XiaoheService, input=245, dubbo=2.0.2, interface=com.dubbo.vba_api.service.xiaohe.XiaoheService, version=0.0.0}]

@Reference(version = "4.0.0", url = "dubbo://127.0.0.1:12345")
private XiaoheService xiaoheService;

version我设置了4.0.0但是还是0.0.0

今晚查找资料

这样写就可以带上version

@Reference(version = "4.0.0", url = "dubbo://127.0.0.1:12345?version = 4.0.0") private XiaoheService xiaoheService;

 

你可能感兴趣的:(dubbo-spring-boot-starter 2.7.0 升级到 2.7.3遇到的第一个坑 org.apache.dubbo.remoting.RemotingException: Not fo)