radondb-mysql-kubernetes icon indicating copy to clipboard operation
radondb-mysql-kubernetes copied to clipboard

Mysql 从节点重建失败,无法同步数据

Open crazychengmm opened this issue 1 month ago • 2 comments

Describe the problem

operator: /mysql-operator/radondb/mysql57-sidecar:v2.3.0 Mysql /mysql-operator/percona/percona-server:5.7.34


从节点出现报错信息

[ERROR] Error reading packet from server for channel '': The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID set sent by the slave is '', and the missing transactions are 'a84655cf-71a2-11ee-aec3-7a94179244c7:1-22314,

Wed, May 15 2024 7:39:27 pm | bc7a6e13-73c6-11ee-a3f3-2a79e19dc85a:1-12141'. (server_errno=1236) Wed, May 15 2024 7:39:27 pm | 2024-05-15T19:39:27.326592+08:00 6943 [ERROR] Slave I/O for channel '': Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID set sent by the slave is '', and the missing transactions are 'a84655cf-71a2-11ee-aec3-7a94179244c7:1-22314, Wed, May 15 2024 7:39:27 pm | bc7a6e13-73c6-11ee-a3f3-2a79e19dc85a:1-12141'.', Error_code: 1236

从错误看是,从去同步发现文件已经找不到了,我设置的文件保留7天的,理论上不会出现这样的问题。

主报错:

[Warning] Cannot replicate to server with server_uuid='55ccb968-12a9-11ef-bfab-0a9a5494a1a9' because the present server has purged required binary logs. The connecting server needs to replicate the missing transactions from elsewhere, or be replaced by a new server created from a more recent backup. To prevent this error in the future, consider increasing the binary log expiration period on the present server. The missing transactions are 'a84655cf-71a2-11ee-aec3-7a94179244c7:1-22314,

Wed, May 15 2024 7:47:05 pm | bc7a6e13-73c6-11ee-a3f3-2a79e19dc85a:1-12141'. Wed, May 15 2024 7:47:05 pm | 2024-05-15T19:47:05.535880+08:00 8862 [Warning] Cannot replicate to server with server_uuid='71603b88-129f-11ef-8cd2-5e29023cab45' because the present server has purged required binary logs. The connecting server needs to replicate the missing transactions from elsewhere, or be replaced by a new server created from a more recent backup. To prevent this error in the future, consider increasing the binary log expiration period on the present server. The missing transactions are 'a84655cf-71a2-11ee-aec3-7a94179244c7:1-22314, Wed, May 15 2024 7:47:05 pm | bc7a6e13-73c6-11ee-a3f3-2a79e19dc85a:1-12141'.

To Reproduce

于是我去重建 从节点,但是从备份还原,还是去通过老的gtid 同步数据了,所以一直是老的问题。 这样,最新备份应该是没有做导致,还原不能去读最新的备份,请教下如何解决啊

Expected behavior

Environment:

  • RadonDB MySQL version:

crazychengmm avatar May 15 '24 11:05 crazychengmm