MySQL error: Relay log write failure: could not queue event from master

When I am studying MariaDB Guys ClusterAutomated cluster deployment plan (MGC) based on Docker. I had completed all debugging, want to deploy a production environment MGC cluster. However, error 1595 occured: Relay log write failure: could not queue event from master.

Production environment master database is MySQL 5.5. The new MGC use Mariadb up to date 10.3.12 stable Version. Imported one from the main DBdump out of the complete SQL.

After that, the change master starts to create the master and slave, then encounted the mysql error: relay log write failure: could not queue event from master.

MariaDB [(none)]> show slave status\G                                                                                                                                                      
*************************** 1. row ***************************
                   Master_Host: x.x.x.x
                   Master_User: rpl
                   Master_Port: 3306
                 Connect_Retry: 60
               Master_Log_File: mysql-bin.001411
           Read_Master_Log_Pos: 360808406
                Relay_Log_File: mysql-relay-bin.000001
                 Relay_Log_Pos: 4
         Relay_Master_Log_File: mysql-bin.001411
              Slave_IO_Running: No
             Slave_SQL_Running: Yes
                    Last_Errno: 0
                  Skip_Counter: 0
           Exec_Master_Log_Pos: 360808406
               Relay_Log_Space: 256
               Until_Condition: None
                 Until_Log_Pos: 0
            Master_SSL_Allowed: No
         Seconds_Behind_Master: NULL
 Master_SSL_Verify_Server_Cert: No
                 Last_IO_Errno: 1595
                 Last_IO_Error: Relay log write failure: could not queue event from master
                Last_SQL_Errno: 0
              Master_Server_Id: 15410
                    Using_Gtid: No
                 Parallel_Mode: conservative
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
              Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 0
1 row in set (0.00 sec)

After some google research, find it is caused by the disk full. Hoever I have no problem with the disk space and permissions, so I continue to check the MGC node log is as follows:

2019-01-28 10:47:26 11 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.001411' at position 512281317, relay log './mysql-relay-bin.000003' position: 151473377
2019-01-28 10:47:26 10 [Note] Slave I/O thread: connected to master '[email protected]:3306',replication started in log 'mysql-bin.001413' at position 412624945
2019-01-28 10:47:26 10 [Warning] Slave I/O: Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error: Unknown system variable 'binlog_checksum', Internal MariaDB error code: 1193
2019-01-28 10:47:26 10 [ERROR] Slave I/O: Replication event checksum verification failed while reading from network, Internal MariaDB error code: 1743
2019-01-28 10:47:26 10 [ERROR] Slave I/O: Relay log write failure: could not queue event from master, Internal MariaDB error code: 1595
2019-01-28 10:47:26 10 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.001413', position 412624945

I find there is a key message: binlog_checksum failed, it seems that the error is related to this. Then checked the information, it should be Mariadb keep slave_sql_verify_checksum is opened by default. It’s kept closed in MySQL by default.

So, it’s the master and slave versions are inconsistent, which resulting in checksum failure.

The solution to relay log write failure: could not queue event from master

To add slave_sql_verify_checksum=0 to the msyqld configuration in each MGC node. Or you can turn off this feature.

Leave a Comment