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

单机模式部署可以直接从配置上加一台master 去改成双master集群方式部署吗 #746

Open
hypnoszhang opened this issue Jan 11, 2024 · 3 comments

Comments

@hypnoszhang
Copy link

发现后起来的master 内置的etcd集群id不一致 导致无法启动。尝试了用etcdctl方式增加peer 但是 增加上去的另外一台master处于unstarted 状态 而且下次启动master会导致etcd无法正常启动
{"level":"warn","ts":"2024-01-11T16:01:15.422527+0800","caller":"etcdserver/server.go:2075","msg":"failed to publish local member to cluster through raft","local-member-id":"bb195eedd3f7da0","local-member-attributes":"{Name:m1 ClientURLs:[http://xxxx:2370]}","request-path":"/0/members/bb195eedd3f7da0/attributes","publish-timeout":"11s","error":"etcdserver: request timed out"}

@zcdb
Copy link
Member

zcdb commented Jan 12, 2024

最好是3台。v3.4.0及之后版本支持新加节点,添加新节点之后,修改master的配置cluster_state="existing" 重启。不过不建议这么做,还是最好一开始就使用3台。

@hypnoszhang
Copy link
Author

请问用两台机器部署的话 有什么要注意的吗。 目前是两台机器都部署了 master 、ps 、router 启动的时候报错 etcd 集群信息不一致
{"level":"warn","ts":"2024-01-12T13:41:51.660452+0800","caller":"rafthttp/http.go:500","msg":"request cluster ID mismatch","local-member-id":"e86cd6b973d3c1f0","local-member-cluster-id":"28d0441f9ffc79eb","local-member-server-version":"3.5.6","local-member-server-minimum-cluster-version":"3.0.0","remote-peer-server-name":"a0fa27f2402bd731","remote-peer-server-version":"3.3.11","remote-peer-server-minimum-cluster-version":"3.0.0","remote-peer-cluster-id":"c61eb9e9b7f8ca9"
master的配置是和官网文档的配置一致的

@zcdb
Copy link
Member

zcdb commented Jan 23, 2024

两台机器也是保障不了高可用的,坏了一台就无法写了。新加入的节点cluster_state="existing",不然就是新创建集群,跟之前的节点不在一个集群里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants