Bug #28795 duplicate server-id leads to infinite slave restart
Submitted: 31 May 2007 7:30 Modified: 10 Jul 2008 0:14
Reporter: Jan Kneschke Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1.17 OS:Any
Assigned to: CPU Architecture:Any

[31 May 2007 7:30] Jan Kneschke
Description:
If replication is setup correct and one of the slaves is stop and changed to use server-id which is already in use, the slave will go into a infinite stop/start cycle. 

How to repeat:
* setup 2 slaves with unique server-ids
  slave A
  * server-id = 2
  slave B
  * server-id = 3

* start all slaves 

* change server-id of slave A to the same id as slave B

070531  8:53:48 [Note] Slave: received end packet from server, apparent master shutdown:
070531  8:53:48 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'hostname-bin.000011' position 389524268
070531  8:53:48 [Note] Slave: connected to master 'repl@127.0.0.1:3306',replication resumed in log 'hostname-bin.000011' at position 389524268
070531  8:53:48 [Note] Slave: received end packet from server, apparent master shutdown:
070531  8:53:48 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'hostname-bin.000011' position 389524268
070531  8:53:48 [Note] Slave: connected to master 'repl@127.0.0.1:3306',replication resumed in log 'hostname-bin.000011' at position 389524268

Suggested fix:
retry in larger intervals. Currently it is retrying as soon as possible in the default-configuration.
[31 May 2007 9:35] Valeriy Kravchuk
Thank you for a problem report. Sounds like a reasonable feature request to me.
[10 Jul 2008 0:14] James Day
Duplicate of bug #33815 that has more suggestions, so making this a duplicate of that one instead of the other way around.