Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dubbo客户端版本>=v2.7.5调用server端版本<=v2.6.x出现No Provider错误(by Zookeeper RegistryCenter) #125

Open
ningyu1 opened this issue Oct 15, 2020 · 0 comments
Labels
type/bug Something isn't working

Comments

@ningyu1
Copy link
Collaborator

ningyu1 commented Oct 15, 2020

Same issue:apache/dubbo#6694

环境配置

注册中心:zookeeper
配置中心:无
dubbo服务端版本:v2.5.x,v.2.6.x
dubbo客户端版本:v2.7.7,v2.7.8,v2.7.6,v2.7.5

问题原因

dubbo v2.7.7版本org.apapche.dubbo.common.URL.getParameter()中删除了default.xxxx的获取,代码如下:

public String getParameter(String key) {
        return parameters.get(key);
}

dubbo v2.7.4版本org.apapche.dubbo.common.URL.getParameter()代码对比:

public String getParameter(String key) {
        String value = parameters.get(key);
        return StringUtils.isEmpty(value) ? parameters.get(DEFAULT_KEY_PREFIX + key) : value;
}

当Server端dubbo版本是旧版本时(这里测试使用的是dubbo v2.5.3、v2.6.6),获取到的Provider URL中只有default.version。

从而导致org.apache.dubbo.common.utils.UrlUtils.isMatch()在进行consumerVersionproviderVersion对比时不相等并返回false,丢掉了这个provider的信息。

@ningyu1 ningyu1 added the type/bug Something isn't working label Oct 15, 2020
@ningyu1 ningyu1 changed the title dubbo客户端v2.7.7以上版本在进行泛化调用server端为v2.6.x以前版本时出现No Provider错误 dubbo客户端v2.7.7以上版本在进行泛化调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) Oct 16, 2020
@ningyu1 ningyu1 changed the title dubbo客户端v2.7.7以上版本在进行泛化调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端v2.7.6以上版本在进行泛化调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) Oct 19, 2020
@ningyu1 ningyu1 changed the title dubbo客户端v2.7.6以上版本在进行泛化调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端v2.7.6以上版本调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) Oct 19, 2020
@ningyu1 ningyu1 changed the title dubbo客户端v2.7.6以上版本调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端v2.7.7以上版本(包含277)调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) Oct 19, 2020
@ningyu1 ningyu1 changed the title dubbo客户端v2.7.7以上版本(包含277)调用server端为v2.6.x以前版本时出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端版本>=v2.7.7调用server端版本<=v2.6.x时出现No Provider错误(by Zookeeper RegistryCenter) Oct 19, 2020
@ningyu1 ningyu1 changed the title dubbo客户端版本>=v2.7.7调用server端版本<=v2.6.x时出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端版本>=v2.7.6调用server端版本<=v2.6.x出现No Provider错误(by Zookeeper RegistryCenter) Dec 2, 2020
@ningyu1 ningyu1 changed the title dubbo客户端版本>=v2.7.6调用server端版本<=v2.6.x出现No Provider错误(by Zookeeper RegistryCenter) dubbo客户端版本>=v2.7.5调用server端版本<=v2.6.x出现No Provider错误(by Zookeeper RegistryCenter) Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant