Percona XtraDB Cluster(PXC) fails to start properly

When restarting all pxc servers today, the error message that cannot start to view the log is as follows:

2018-02-03 09:05:50 3913 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates. 
To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .

To modify according to the prompts, first find the grastate.dat file. If you don’t know where the first modification is, you can only run the find command to find it. Find it from the root directory:

cd /
find .  -name 'grastate.dat'

The result file is in the /var/lib/mysql/grastate.dat directory and you can copy this

Then execute the vi command:

vi  /var/lib/mysql/grastate.dat 

Modify the safe_to_bootstrap value of the current file to 0 and change it to 1. The structure is as follows:

# GALERA saved state
version: 2.1
uuid:    002bd039-c2c8-11e7-82c7-36d79987c3c9
seqno:   -1
safe_to_bootstrap: 1

Then execute the command /etc/init.d/mysql bootstrap-pxc to start, but when the startup is complete, safe_to_bootstrap will be changed to 0. I guess it may be that safe_to_bootstrap is not changed from 0 to 1 when restarting under abnormal circumstances, which makes it impossible to start. Yes, next time you encounter the same problem, you can modify it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325191560&siteId=291194637