简体   繁体   English

重新同步 galera 节点

[英]Resyncing galera node

I have galera cluster with several nodes.我有多个节点的 galera 集群。 Some of the nodes were down from long time (4 days) and the binlog files get deleted daily.一些节点长时间(4 天)宕机,binlog 文件每天都会被删除。 Now I am unable to start any of these nodes.现在我无法启动这些节点中的任何一个。

Dec 25 00:20:06 mysqld[14220]: 2022-12-25  0:20:01 0 [ERROR] mysqld: File '/var/log/mysql/master-bin.059377' not found (Errcode: 2 "No such file or directory")
Dec 25 00:20:06 mysqld[14220]: 2022-12-25  0:20:01 0 [ERROR] Failed to open log (file '/var/log/mysql/master-bin.059377', errno 2)
Dec 25 00:20:06 mysqld[14220]: 2022-12-25  0:20:01 0 [ERROR] Could not open log file
Dec 25 00:20:06 mysqld[14220]: 2022-12-25  0:20:01 0 [ERROR] Can't init tc log
Dec 25 00:20:06 mysqld[14220]: 2022-12-25  0:20:01 0 [ERROR] Aborting'

How can I force these nodes to start over as if they were new nodes?我怎样才能强制这些节点重新开始,就好像它们是新节点一样?

I solved the issue and it worked.我解决了这个问题并且它起作用了。 In my scenario, I have 4 nodes, 3 of them were down for a long time and a single node was in a healthy state and running.在我的场景中,我有 4 个节点,其中 3 个长时间停机,一个节点处于健康状态 state 并正在运行。 When I tried to start any of the broken nodes, they refused as they couldn't find the needed master-bin.x log files.当我试图启动任何损坏的节点时,他们拒绝了,因为他们找不到所需的 master-bin.x 日志文件。 I forced full sync by running the following on the broken nodes:我通过在损坏的节点上运行以下命令来强制完全同步:

sudo -u mysql mysqld --skip-slave-start

Once the node stated changed to 'joined' and 'synced', I softly killed the process and started it again using systems.一旦节点声明更改为“已加入”和“已同步”,我就会轻轻地终止该进程并使用系统再次启动它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM