Bug #50577 ERROR 1594 : Relay log read failure: Could not parse relay log event entry.
Submitted: 25 Jan 2010 4:06 Modified: 29 Jun 2012 19:04
Reporter: roy valencia Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version: 5.1.37 OS:Linux ( 5.1.37-log ( source code ))
Assigned to: CPU Architecture:Any
Tags: replication

[25 Jan 2010 4:06] roy valencia
Description:
Nota: sorry my english is very bad.

hi , my name is roy.

i have a problema with de replication in mysql 5.1.37 source code , OS ubuntu.

configuration:

server 1:
/etc/mysql/my.cnf

server-id=1
log_bin=/var/log/mysql/mysql-bin.log

server 2:
/etc/mysql/my.cnf

server-id=2
log_bin=/var/log/mysql/mysql-bin.log

//////////////////////

when i have the conection.

change master to master_host='ip', master_port=3306, master_user='replication', master_password='slave';

/////////////////////

show slave status\G; -->> ok both server.

////////////////////

in server 1 , 

show database;use test , create table emp1(id int);
ok

in server 2 ;

*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.32.132
                  Master_User: replication
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 191
               Relay_Log_File: mysqld-relay-bin.000002
                Relay_Log_Pos: 251
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594
                   Last_Error: 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.
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 106
              Relay_Log_Space: 492
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 1594
               Last_SQL_Error: 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.
1 row in set (0.00 sec)

ERROR: 
No query specified

/////////////////

i don´t know what is the problema?¿.

1.- reinstall the mysql ->> error equal.
2.- reinstall ubuntu , install mysql -->> error equal.

/////////////////

this error for my experiencia is only with the  5.1.37-log ( source code ) in ubuntu.

because i have replication with faileover in opensuse and all is ok, i need help because the datacenter migrating to ubuntu.

or mysql.com have mysql for .deb ?¿

How to repeat:
replication
[25 Jan 2010 4:09] roy valencia
i need help because my company have mysql-enterprice because no exist .deb packeges for ubuntu and i testing with of source code of comunity but the error is equal.

help please.
[25 Jan 2010 4:24] roy valencia
i do:

reset slave
flush logs
reset master
purge logs

in both server 
i change master again
and start la replication .

show slave status , ok

but i create database o table in 1 server.

error : 1594 , binary corrupted.

please help.
[25 Jan 2010 10:09] Sveta Smirnova
Thank you for the report.

Please provide full configuration files for both master and slave.
[25 Jan 2010 14:26] roy valencia
bothserver:
reset slave , reset master , fluhs logs , purge logs.

/etc/mysql/my.cnf

server 1: IP=192.168.32.132
///////////////////////////////

[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]

user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr/local/mysql
datadir		= /var/lib/mysql
tmpdir		= /tmp
skip-external-locking

bind-address		= 0.0.0.0

key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8

myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
query_cache_limit	= 1M
query_cache_size        = 16M

server-id		= 1
log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name

[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

!includedir /etc/mysql/conf.d/
///////////////////////////////
start: 
change master to master_host='192.168.32.133', master_port=xxxx, 
master_user='xxxx', master_password='xxxx';
slave start;
show slave status \G; => OK

server 2 :IP=192.168.32.133
///////////////////////////////

[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]

skip-name-resolve

user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr/local/mysql
datadir		= /var/lib/mysql
tmpdir		= /tmp
skip-external-locking

bind-address		= 0.0.0.0

key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 192K
thread_cache_size       = 8

myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10

query_cache_limit	= 1M
query_cache_size        = 16M

general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#

server-id		= 2
log_bin			= /var/log/mysql/mysql-bin.log
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name

[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

!includedir /etc/mysql/conf.d/
///////////////////////////////
start: 
change master to master_host='192.168.32.132', master_port=xxxx, 
master_user='xxxx', master_password='xxxx';
slave start;
show slave status \G; => OK

--------------

create table o database o insert, error:1594

A need help please.
[25 Jan 2010 20:27] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with same settings and using upcoming version 5.1.43.

You wrote you use self-build version 5.1.37. It is a bit old and several replication bugs were fixed since. Please try version 5.1.42 and if problem still exists provide your configuration line and full error logs from both servers.
[26 Feb 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Feb 2012 6:05] Muhammad Khalid
I am facing the same problem with the version 5.5.20 on CENTOS 6.2. Is there any permanent solution to it because I have flushed the logs 2 time before on the same server. Thanks
[21 Mar 2012 19:46] Sveta Smirnova
Muhammad,

thank you for the feedback. This issue should not happen at all in normal operations. But can happen if, say, relay log was corrupted because disk or network failure. Please check these two possibilities and if both is not the case try to find pattern which lead to this error.
[22 Apr 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 May 2012 14:42] Kevin Benton
We're seeing the same issue when using the following:

Slave: 5.1.45-enterprise-gpl-advanced-log
Master: 5.5.19-ndb-7.2.4-enterprise-commercial-advanced-log
[29 May 2012 19:04] Sveta Smirnova
Kevin,

thank you for the feedback. If I understood correctly you can not prove error in your case is not affected by network issue or corruption too. So I set status back to "Need feedback". Please work on your case in SR.
[30 Jun 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".