MySQL Forums
Forum List  »  Replication

Re: one slave claims binlog corrupt, other is fine
Posted by: James Day
Date: January 19, 2005 01:32AM

First, the fix, guaranteed lossless if you still have the binary log file on the master:


f you get a "Could not parse relay log event entry" error in a working replication setup and other slaves are fine, use SHOW SLAVE STATUS then STOP SLAVE; CHANGE MASTER TO master_log_file='(insert the value from Relay_Master_Log_File)', master_log_pos=(insert the value from Exec_master_log_pos); START SLAVE; . The slave will re-fetch from the master with no risk of losing a transaction. You should also look at the error log, in case it wasn't just a damaged network packet the first time. For example:

mysql> show slave status \G
*************************** 1. row ***************************
Master_Host: ariel
Master_User: repl
Master_Port: 3306
Connect_retry: 60
Master_Log_File: ariel-bin.560
Read_Master_Log_Pos: 485024965
Relay_Log_File: bacon-relay-bin.002
Relay_Log_Pos: 132854483
Relay_Master_Log_File: ariel-bin.560 <-----
Slave_IO_Running: Yes
Slave_SQL_Running: No
Last_errno: 0
Last_error: 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.
Skip_counter: 0
Exec_master_log_pos: 199062653 <-----
Relay_log_space: 420205811
1 row in set (0.02 sec)

mysql> stop slave; CHANGE MASTER TO master_log_file='ariel-bin.560' , master_log_pos=199062653; START SLAVE;


Are you using Fedora Core 2 or 3? If you are please post details of your exact operating system version and your disk controller and disk drives. There's a known issue in FC2 and 3 with systems under high load and getting more data to help pin it down will be helpful. I've only seen it so far with SATA systems, not SCSI.

Options: ReplyQuote

Written By
Re: one slave claims binlog corrupt, other is fine
January 19, 2005 01:32AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.