Last_IO_Error: Fatal error: The slave I/O thread stops
search cancel

Last_IO_Error: Fatal error: The slave I/O thread stops


Article ID: 42933


Updated On:


CA API Gateway


The MySQL server used by the Gateway appliance uses an integer value (the server ID)to uniquely identify nodes in a cluster among each other. If these identifiers are not unique among all nodes in the cluster the MySQL replication will fail the next time the MySQL server is restarted. Replication failures can result in data loss if not addressed appropriately and put the Gateway in a degraded state.

If the databases in the Gateway cluster are not configured with unique identifiers then the following error messages will occur ; 

Query the status of replication on both nodes: mysql -e "show slave status\G"

Slave_IO_Running: No
Slave_SQL_Running: Yes

Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).




All supported versions of the API Gateway


The MySQL server configuration file (my.cnf) contains a configuration directive that specifies the unique identifier for each MySQL server. The following is an excerpt from a Gateway appliance that has MySQL replication configured and enabled:

# Uncommment log-bin, log-slave-update and log_bin_trust_function_creators
# if a clustered db server
# uncomment the next item on 1st db master server
# uncomment the next item on 2nd db master servers

In order to resolve this issue, ensure that each database node in the cluster has a unique value for the "uncommented" server-id directive. Make any necessary changes and then restart the MySQL server. Once the MySQL server restarts, verify the status of replication via the SHOW SLAVE STATUS query. If replication reports the following messages then replication is restored:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes


Additional Information

If replication reports any other running state for MySQL replication then please review the article on how to reinitialize replication: