Bug #28608 replication fail frequently
Submitted: 23 May 2007 1:35 Modified: 27 May 2007 11:28
Reporter: JinRong Ye Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0.37 OS:Linux (Red Hat Enterprise Linux AS release 4 (Nahant Update 2))
Assigned to: CPU Architecture:Any
Tags: replication

[23 May 2007 1:35] JinRong Ye
Description:
I setup mysql replication between two linux server with the 5.0.37 version. The slave report error messages below frequently and got down:

070517 17:30:47 [Warning] "SELECT UNIX_TIMESTAMP()" failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS

or 

070523  7:49:52 [ERROR] While trying to obtain the list of slaves from the master '192.168.0.2:3306', user 'rep' got the following error: ''

or 

070522 21:23:32 [ERROR] Slave I/O thread: error reconnecting to master 'rep@192.168.0.2:3306': Error: 'MySQL server has gone away'  errno: 2006  retry-time: 2  retries: 100000000

There is no errors when i setup the replication on the same server with mysql 4.0.23 => mysql 5.0.37 and another replication under freebsd 6.2 server.

My replication configure in my.cnf:
server-id  = 21
master-host     = 192.168.0.2
master-user     = rep
master-password = rep
replicate-same-server-id    = FALSE
replicate-ignore-db  = mysql
replicate-ignore-db  = test
skip-slave-start
set-variable="slave-skip-errors=0,1007,1053,1062,1213,1158,1159"
log-slave-updates
master-connect-retry    = 2
master-retry-count      = 100000000
slave_net_timeout       = 1
log-bin     = /logs/mysql/logbin
relay-log   = /logs/mysql/relay
log-bin-index   = /logs/mysql/logbin.index
relay-log-index = /logs/mysql/relay.index
master-info-file    = /logs/mysql/master.info
relay-log-info-file = /logs/mysql/relay.info

How to repeat:
Unknown, sorry, but it is happening frequently.
[23 May 2007 7:43] Sveta Smirnova
Thank you for the report.

Please upgrade to last 5.0.41 version and examine if problem still exists.

Also 'MySQL server has gone away' error can show what something wrong with master. Please check master error log. Also please read change logs for MySQL since 4.0.23 untill 5.0.41, because there were several backward incompatible changes and your application can meet them.
[23 May 2007 7:51] JinRong Ye
there is no error log on master,thanks
[23 May 2007 7:53] Sveta Smirnova
Please turn on log-error setting in your master configuration file.
[23 May 2007 10:10] JinRong Ye
sorry,i mean there is no error message on master,i have turn on the log-error.
[25 May 2007 5:11] JinRong Ye
i set the global variables slave_net_timeout to 3(the original value is 1),mysql report the error messages above become not so frequently
[27 May 2007 11:28] Sveta Smirnova
Thank you for the feedback.

Default value of slave_net-timeout is 3600. Also you can meet network problems. So I'll classify this report as "Not a Bug".