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 1.4.1 集群中某节点下线,其余节点不能正确稳定感知状态 #4925

Closed
MajorHe1 opened this issue Feb 22, 2021 · 4 comments
Assignees
Labels
kind/bug Category issues or prs related to bug.
Milestone

Comments

@MajorHe1
Copy link
Collaborator

Describe the bug
我在 #4877 中提到过这个问题,现在再复现一遍
版本是1.4.1,用的是官方发布的release包
三台机器,分别是 172.21.1.134(记为134),172.21.1.150(记为150),172.21.1.153(记为153)

注意看图片中的时间戳

  1. 先杀掉134机器上的nacos进程

image

2.在153机器的控制台上查看134节点的状态

image
image
image
image

3.换成Postman访问OpenAPI提供的接口

image

image

@MajorHe1
Copy link
Collaborator Author

关于B\C为什么没有感知到A挂掉,分析可能的原因:
A中的nacos并未优雅的退出,导致其在退出之前没有触发IPChangeEvent事件。而ServerMemberManager类中所维护的IP列表只有在监听到该事件时,才会进行写操作(nacos1.4.2,ServerMemberManager.java line181)。没有接到这个事件的话,就没有办法把IP列表中的A清除。

我印象中nacos的实现难道不应该是B\C主动去探测A的状态,如果A不活就把A的状态置为down的吗?
B\C是否感知A挂掉,应该不由A是否进行优雅退出、是否触发事件决定才对,因为A节点所在机器出现任何机器故障、断网、阻塞,B\C探测A的状态不通就应该更改状态。
是我印象错了还是代码改了?

@realJackSun
Copy link
Collaborator

@MajorHe1 这个暂时复现不了,可否提供一下您实验的详细信息?
以及使用的寻址模式是地址服务器方式还是cluster.conf配置文件的方式?

@MajorHe1
Copy link
Collaborator Author

@MajorHe1 这个暂时复现不了,可否提供一下您实验的详细信息?
以及使用的寻址模式是地址服务器方式还是cluster.conf配置文件的方式?

请问您还需要何种详细的信息呢?
我用的是 1.4.1版本的release包,部署的机器是 腾讯云的虚拟机,寻址模式是地址服务器
地址服务器是另外一个nacos进程的配置中心服务,集群内的nacos节点都是通过OpenAPI去获取这个配置
为了排除虚拟机的干扰,我会在物理机上再试一次,稍等给到您复现结果

@MajorHe1
Copy link
Collaborator Author

@JackSun-Developer 问题已经明确,已经提了PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

3 participants