启动Percona XTradb群集的死节点

时间:2018-08-25 04:49:15

标签: percona percona-xtradb-cluster

我们有一个带有三个节点的Xtradb集群。有一个节点,该节点未正确停止并且无法启动。其他两个节点正常工作并且正在响应。日志中唯一的东西是这样的:

-- Unit mysql.service has begun starting up.
Aug 25 04:40:45 percona-prod-perconaxtradb-vm-0 /etc/init.d/mysql[2503]: MySQL PID not found, pid_file detected/guessed: /var/run/mysql
Aug 25 04:40:52 percona-prod-perconaxtradb-vm-0 mysql[2462]: Starting MySQL (Percona XtraDB Cluster) database server: mysqld . . . . .
Aug 25 04:40:52 percona-prod-perconaxtradb-vm-0 mysql[2462]: failed!
Aug 25 04:40:52 percona-prod-perconaxtradb-vm-0 systemd[1]: mysql.service: control process exited, code=exited status=1
Aug 25 04:40:52 percona-prod-perconaxtradb-vm-0 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daem
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

/var/lib/mysql/wsrep_recovery.qEEkjd中,我们发现了这一点:

2018-08-25T05:49:31.055887Z 0 [ERROR] Found 20 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
2018-08-25T05:49:31.055892Z 0 [ERROR] Aborting

2018-08-25T05:49:31.055901Z 0 [Note] Binlog end

我们想完全删除这些20 prepared transactions

另外两个节点是一致的并且可以正常工作,因此只要告诉该节点“忽略您的状态并与其他节点同步”就足够了。

1 个答案:

答案 0 :(得分:0)

最后,我们删除了死节点上的color: ${props.color}文件夹,然后重新启动了该节点。然后,该节点开始${dynamicStyle}复制-这需要很长时间,并且唯一可以看到的进展就是检查文件夹的大小。但是后来奏效了。