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 nacos version question #3880

Closed
CjqDy opened this issue Apr 16, 2019 · 8 comments
Closed

dubbo nacos version question #3880

CjqDy opened this issue Apr 16, 2019 · 8 comments
Labels
status/waiting-for-feedback Need reporters to triage

Comments

@CjqDy
Copy link

CjqDy commented Apr 16, 2019

dubbo 2.6.5 + nacos0.0.2 报错
Exception in thread "main" java.lang.IllegalStateException: Failed to load extension class(interface: interface com.alibaba.dubbo.registry.RegistryFactory, class line: com.alibaba.dubbo.registry.nacos.NacosRegistryFactory)

目录结构还是有问题

换成最新的2.7.1版本
无法注册成功
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848]) tried: failed to req API:http://127.0.0.1:8848/nacos/v1/ns/instance. code:400 msg: dom not found: DEFAULT_GROUP@@providers:com.orange.service.DemoService

@CjqDy CjqDy changed the title dubbo 2.6.5 + nacos 0.0.2 question dubbo nacos version question Apr 16, 2019
@chenlushun
Copy link
Contributor

chenlushun commented Apr 17, 2019

@CjqDy Dubbo2.6.5 not support nacos
see #3582

@ralf0131
Copy link
Contributor

ralf0131 commented Apr 17, 2019

Dubbo support Nacos from 2.7.0 and 2.6.6. Could you please provide steps to reproduce this issue?

@ralf0131 ralf0131 added the status/waiting-for-feedback Need reporters to triage label Apr 17, 2019
@CjqDy
Copy link
Author

CjqDy commented Apr 17, 2019

Dubbo support Nacos from 2.7.0 and 2.6.6. Could you please provide steps to reproduce this issue?

当前项目运行版本是 com.alibaba.dubbo 2.6.6 + dubbo-registry-nacos 0.0.1
正常注册消费没有问题(在2.6.5版本尝试也没有问题)

1.把nacos版本换成0.0.2后
有两个错误:
无法记载RegistryFactory
Failed to load extension class(interface: interface com.alibaba.dubbo.registry.RegistryFactory
NacosException不存在
java.lang.NoClassDefFoundError: com/alibaba/nacos/api/exception/NacosException
2. dubbo2.7.1 版本+nacos 2.7.1

org.apache.dubbo
dubbo
2.7.1


org.apache.dubbo
dubbo-registry-nacos
2.7.1


com.alibaba.nacos
nacos-client
1.0.0-RC3

只是换了dubbo 和 nacos的依赖
其他都没动
启动报错
dubbo version: 2.7.1, current host: 192.168.121.110
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848]) tried: failed to req API:http://127.0.0.1:8848/nacos/v1/ns/instance. code:400 msg: dom not found: DEFAULT_GROUP@@providers:com.orange.service.DemoService

dubbo 版本换成2.7.0还是一样

@Skqing
Copy link

Skqing commented Jun 11, 2019

dubbo 2.7.1
dubbo-registry-nacos 2.7.1
还是一样 也是报错
failed to req API:http://192.168.31.82:8848/nacos/v1/ns/instance. code:500 msg: ErrCode:400,ErrMsg:service not found, namespace: public, service: DEFAULT_GROUP@@providers:com.hct.example.client.DubboTestService:1.0.0:

@CjqDy
Copy link
Author

CjqDy commented Jun 11, 2019

dubbo 2.7.1
dubbo-registry-nacos 2.7.1
还是一样 也是报错
failed to req API:http://192.168.31.82:8848/nacos/v1/ns/instance. code:500 msg: ErrCode:400,ErrMsg:service not found, namespace: public, service: DEFAULT_GROUP@@providers:com.hct.example.client.DubboTestService:1.0.0:

nacos server 版本是多少?1.0.0.版本以下会有这个问题的

@Skqing
Copy link

Skqing commented Jun 12, 2019

dubbo 2.7.1
dubbo-registry-nacos 2.7.1
还是一样 也是报错
failed to req API:http://192.168.31.82:8848/nacos/v1/ns/instance. code:500 msg: ErrCode:400,ErrMsg:service not found, namespace: public, service: DEFAULT_GROUP@@providers:com.hct.example.client.DubboTestService:1.0.0:

nacos server 版本是多少?1.0.0.版本以下会有这个问题的
nacos server 是 nacos-server-1.0.0-RC1

@CjqDy
Copy link
Author

CjqDy commented Jun 12, 2019

dubbo 2.7.1
dubbo-registry-nacos 2.7.1
还是一样 也是报错
failed to req API:http://192.168.31.82:8848/nacos/v1/ns/instance. code:500 msg: ErrCode:400,ErrMsg:service not found, namespace: public, service: DEFAULT_GROUP@@providers:com.hct.example.client.DubboTestService:1.0.0:

nacos server 版本是多少?1.0.0.版本以下会有这个问题的
nacos server 是 nacos-server-1.0.0-RC1

调试一下:应该是在调用NamingProxy里的callServer方法 里报错的。
HttpResult result = HttpClient.request(url, headers, params, "UTF-8", method)
再对比一下nacos server里的接口入参是否一样
一般400就是参数不匹配

@Skqing
Copy link

Skqing commented Jun 12, 2019

dubbo 2.7.1
dubbo-registry-nacos 2.7.1
还是一样 也是报错
failed to req API:http://192.168.31.82:8848/nacos/v1/ns/instance. code:500 msg: ErrCode:400,ErrMsg:service not found, namespace: public, service: DEFAULT_GROUP@@providers:com.hct.example.client.DubboTestService:1.0.0:

nacos server 版本是多少?1.0.0.版本以下会有这个问题的
nacos server 是 nacos-server-1.0.0-RC1

调试一下:应该是在调用NamingProxy里的callServer方法 里报错的。
HttpResult result = HttpClient.request(url, headers, params, "UTF-8", method)
再对比一下nacos server里的接口入参是否一样
一般400就是参数不匹配

url:
dubbo://10.2.1.3:20880/com.hct.example.nacos.provider.service.DubboTestService?anyhost=true&application=new-demo-nacos-provider&bean.name=ServiceBean:com.hct.example.nacos.provider.service.DubboTestService:1.0.0&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=com.hct.example.nacos.provider.service.DubboTestService&methods=sayHello&pid=7484&register=true&release=2.7.2&revision=1.0.0&side=provider&timestamp=1560307200719&version=1.0.0

service not found
参数不匹配那就是版本对应不上了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Need reporters to triage
Projects
None yet
Development

No branches or pull requests

5 participants