Bug #30702 Unable to setup master-slave replication
Submitted: 29 Aug 2007 17:19 Modified: 29 Aug 2007 17:52
Reporter: Howard Finer Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:5.0.46 OS:Linux
Assigned to: CPU Architecture:Any

[29 Aug 2007 17:19] Howard Finer
Description:
We are trying to enable master slave replication, and believe we have everything properly configured.  However, when the slave is enabled we get the following messages regarding the master server ID:

070829 13:02:00 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.46-enterprise'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Enterprise Server (Commercial)
070829 13:02:00 [Note] Slave SQL thread initialized, starting replication in log 'change-bin.000003' at position 501900, relay log '/export/home/dbdata/APPDB/aragorn-relay-bin.000001' position: 98
070829 13:02:00 [Note] Slave I/O thread: connected to master 'dbimpl_replica@mimosa:3306',  replication started in log 'change-bin.000003' at position 501900
070829 13:02:00 [ERROR] Error reading packet from server: Misconfigured master - server id was not set ( server_errno=1236)
070829 13:02:00 [ERROR] Got fatal error 1236: 'Misconfigured master - server id was not set' from master when reading data from binary log
070829 13:02:00 [Note] Slave I/O thread exiting, read up to log 'change-bin.000003', position 501900

From all the checks we have performed, the server ID is properly sewt.  The server ID on the master is 1, and the server ID on the slave is 2.  The values are set in the my.cnf file.

What are we missing/what more do we need to do?

Thanks,
Howard

How to repeat:
Happens every time.
[29 Aug 2007 17:52] Howard Finer
The issue had something to do with the log-bin, log-bin-index, relay-log, and relay-log-index settings.  When I set all 4 in the my.cnf file, everything works properly.  Prior to setting the values, there was a file called "--server_id=1.index" being created on the master, backed up to the slave, and confusing the server.  Once the 4 values were set (just the 2 log-bin ones on the master), everything works properly.

this can be closed.