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

nacos升级到2.3.0之后 老版本的sdk无法连接nacos #12071

Closed
five111 opened this issue May 8, 2024 · 6 comments
Closed

nacos升级到2.3.0之后 老版本的sdk无法连接nacos #12071

five111 opened this issue May 8, 2024 · 6 comments
Labels
status/invalid This doesn't seem right

Comments

@five111
Copy link

five111 commented May 8, 2024

升级前
nacos server 2.1.0
nacos client 2.1.0
升级后
nacos server 2.3.0
nacos client 2.1.0

发现2.1.0的客户端无法连接的2.3.0的服务端
服务端报错日志如下
2024-05-08 16:27:27.336+08:00 |INFO|com.alibaba.nacos.remote.ServerCommonScheduler.0||||144|c.a.nacos.plugin.control.connection Connection check task end 2024-05-08 16:27:27.590+08:00 |WARN|nacos-grpc-executor-3||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156787595_172.18.0.1_43786] is un registered , 2024-05-08 16:27:27.591+08:00 |WARN|nacos-grpc-executor-8||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156787595_172.18.0.1_43786] is un registered , 2024-05-08 16:27:27.648+08:00 |INFO|grpc-default-worker-ELG-3-1||||61|com.alibaba.nacos.core.remote.digest Connection transportReady,connectionId = 1715156847648_172.18.0.1_51624 2024-05-08 16:27:27.751+08:00 |INFO|grpc-default-worker-ELG-3-1||||76|com.alibaba.nacos.core.remote.digest Connection transportTerminated,connectionId = 1715156787595_172.18.0.1_43786 2024-05-08 16:27:28.183+08:00 |WARN|nacos-grpc-executor-5||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156843190_172.18.0.1_44428] is un registered , 2024-05-08 16:27:28.183+08:00 |WARN|nacos-grpc-executor-14||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156843190_172.18.0.1_44428] is un registered , 2024-05-08 16:27:28.190+08:00 |INFO|grpc-default-worker-ELG-3-1||||61|com.alibaba.nacos.core.remote.digest Connection transportReady,connectionId = 1715156848190_172.18.0.1_58280 2024-05-08 16:27:28.293+08:00 |INFO|grpc-default-worker-ELG-3-1||||76|com.alibaba.nacos.core.remote.digest Connection transportTerminated,connectionId = 1715156843190_172.18.0.1_44428 2024-05-08 16:27:28.293+08:00 |WARN|nacos-grpc-executor-9||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156848190_172.18.0.1_58280] is un registered , 2024-05-08 16:27:28.293+08:00 |WARN|nacos-grpc-executor-7||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156848190_172.18.0.1_58280] is un registered , 2024-05-08 16:27:28.300+08:00 |INFO|grpc-default-worker-ELG-3-1||||61|com.alibaba.nacos.core.remote.digest Connection transportReady,connectionId = 1715156848300_172.18.0.1_58282 2024-05-08 16:27:28.403+08:00 |INFO|grpc-default-worker-ELG-3-1||||76|com.alibaba.nacos.core.remote.digest Connection transportTerminated,connectionId = 1715156848190_172.18.0.1_58280 2024-05-08 16:27:28.404+08:00 |WARN|nacos-grpc-executor-13||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156848300_172.18.0.1_58282] is un registered , 2024-05-08 16:27:28.529+08:00 |WARN|nacos-grpc-executor-7||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156843529_172.18.0.1_42602] is un registered , 2024-05-08 16:27:28.529+08:00 |WARN|nacos-grpc-executor-2||||116|com.alibaba.nacos.core.remote.digest [grpc] Invalid connection Id ,connection [1715156843529_172.18.0.1_42602] is un registered , 2024-05-08 16:27:28.536+08:00 |INFO|grpc-default-worker-ELG-3-1||||61|com.alibaba.nacos.core.remote.digest Connection transportReady,connectionId = 1715156848536_172.18.0.1_50454

debug服务端发现 客户端的ConnectionSetupRequest服务端无法正确响应 看了下代码 发现2.1.0到2.3.0这块实现确实有变化
请问这个改动是否就是不兼容的?

@five111
Copy link
Author

five111 commented May 8, 2024

// wait for response if (recAbilityContext.isNeedToSync()) { // try to wait for notify response recAbilityContext.await(this.clientConfig.capabilityNegotiationTimeout(), TimeUnit.MILLISECONDS); // if no server abilities receiving, then reconnect if (!recAbilityContext.check(grpcConn)) { return null; } } else { // leave for adapting old version server // registration is considered successful by default after 100ms // wait to register connection setup Thread.sleep(100L); }
看注释内容似乎考虑到了新版本sdk兼容老版本服务端 但目前从现象看 似乎没有考虑新版本服务端兼容老版本sdk

@KomachiSion
Copy link
Collaborator

升级到最新版本试一下, 这个问题应该修复了。

@Daydreamer-ia
Copy link
Contributor

这个是等待 sdk 和服务端同步彼此的能力信息,并不会影响到正常的连接注册流程。我在本地用 V2.1.0 的客户端和 V2.3.0 的服务端测试,貌似没有复现,如果可以的话,提供更多的信息

@Daydreamer-ia
Copy link
Contributor

你们升级的时候,nacos服务端地址有变吗?感觉日志里是不是你们刚做切换的时候,刚启动的服务端直接收到客户端的业务请求(客户端注册在下线的server而没有注册到升级的server)导致的

@five111
Copy link
Author

five111 commented May 11, 2024

这个是等待 sdk 和服务端同步彼此的能力信息,并不会影响到正常的连接注册流程。我在本地用 V2.1.0 的客户端和 V2.3.0 的服务端测试,貌似没有复现,如果可以的话,提供更多的信息

感谢回答!经过这两天调试发现不是不兼容 是我们打nacos服务端包的时候 少了jar包导致的
顺便问一下sdk 和服务端同步彼此的能力信息 这个能力老的客户端应该没有吧 这个的影响是什么 有兼容性风险 或者能力缺失啥的吗

@Daydreamer-ia
Copy link
Contributor

这个是等待 sdk 和服务端同步彼此的能力信息,并不会影响到正常的连接注册流程。我在本地用 V2.1.0 的客户端和 V2.3.0 的服务端测试,貌似没有复现,如果可以的话,提供更多的信息

感谢回答!经过这两天调试发现不是不兼容 是我们打nacos服务端包的时候 少了jar包导致的 顺便问一下sdk 和服务端同步彼此的能力信息 这个能力老的客户端应该没有吧 这个的影响是什么 有兼容性风险 或者能力缺失啥的吗

影响不是很大,到2.3.0版本才增加了一个能力,可以看一下release note的feature

@KomachiSion KomachiSion added status/invalid This doesn't seem right and removed status/need feedback labels May 24, 2024
@KomachiSion KomachiSion closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants