-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 节点上下线状态无法及时同步 #11135
Comments
我也碰到了这类似的问题,我在元数据加了 version=1.1.7.1,我新发布服务改为为 version=1.1.8.1,我也把镜像中的jar 反编译查看里面配置是version=1.1.8.1,但是 nacos 上面还是 version=1.1.7.1,但是有些服务却是 version=1.1.8.1 |
1 similar comment
我也碰到了这类似的问题,我在元数据加了 version=1.1.7.1,我新发布服务改为为 version=1.1.8.1,我也把镜像中的jar 反编译查看里面配置是version=1.1.8.1,但是 nacos 上面还是 version=1.1.7.1,但是有些服务却是 version=1.1.8.1 |
描述上看, 你只设置了过期时间, 没设置扫描周期, 所以在扫描周期期间内重新注册的服务, 会因为重新注册而导致元数据不再过期。至于最终enabled=true, 很可能是有更新脚本又调用接口把状态更新为true了。 可以看下文档, 把扫描间隔也调小。 另外, 运维操作应该保证对称, 下线时调用了enabled=false, 那么 上线时理论上应该在ready后调用enabled=true。 |
@KomachiSion 整个平滑发布流程 其他问题:扫描间隔参数是nacos.naming.clean.expired-metadata.interval 这个吗? 默认值是5s,也很小了 |
第4步存在问题,自动注册的实例运行时enable=true,但如果此时上次的元数据未过期,还是会使用旧的enabled=false的元数据。 如果你说一定超过了过期时间和扫描周期很久了,还是=false,那么你可以从两个方向排查:
|
No more response from author, and community can't reproduce this problem and current information is not enough to find problem. |
+10086 |
背景:
我们提供了节点平滑下线的功能,先将临时节点的enable = false,然后kill 进程,进行发布部署后dubbo 自动注册到nacos。
参数nacos.naming.clean.expired-metadata.expired-time 设置为5s,保证服务注册前,元数据(enable = false)被清除
问题:
服务发布后,成功注册节点到nacos上,但是发现有些节点过了2min,仍然发现enable = false,但是最终enable=true。
是raft 协议的问题吗?还是定时任务的的问题?
Refactor auto cleaner to adapt clean metadata #4354
nacos 版本:2.2.0
The text was updated successfully, but these errors were encountered: