I have a master (master 1) that replicates to another master (master 2), which then replicates to its slave.
So master 2 had an issue with the binary logs:
Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
Which I've run into before and was able to resolve by running the same commands I ran from this thread, expire_logs_days directive requires change master? (I'll ask a question later about why this is still occuring, not my current issue though).
If interested here's the relevant bit from that thread for how I got it working:
stop slave;
reset slave;
change master to master_log_file='...' , master_log_pos=...
start slave;
so now master 2 is good and replicating from master 1. This time though the slave of master 2 broke as well.
The error I'm getting is:
Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from position > file size; the first event 'mysqld-bin.000397' at 244145356, the last event read from './mysqld-bin.000397' at 4, the last byte read from './mysqld-bin.000397' at 4.'
When I run SHOW BINARY LOGS;
on the slave I get:
ERROR 1381 (HY000): You are not using binary logging
What happened to my slave? Why's it not working with the logs anymore? The master still has the log file so I figured running the stop
, reset
, change
, start
would resolve the issue (because it would re-request the logs) but it didn't.
Crashed binlog file...
event in the error log?2018-06-02 02:49:17 1839 [ERROR] /usr/sbin/mysqld: Table './stats/stats' is marked as crashed and should be repaired
(to date).ICrashed binlog file {name} size is {number}, but recovered up to {number}. Binlog trimmed to {number} bytes.
crashed
reference is the one provided. I'm repairing that table on the master now. I did addexpire_logs_days=7
a few weeks ago on the master, could that have have deleted the log and caused the issue? I thought it was for the logs from master1.expire_logs_days
applies only to the server where it is configured. Also,SHOW BINARY LOGS
would be run on the master, not the slave, in a 2-server system.