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

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

book

Article ID: 42933

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

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).

 

 

Environment

All supported versions of the API Gateway

Resolution

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
log-bin=/var/lib/mysql/ssgbin-log
log_bin_trust_function_creators=1
log-slave-update
# uncomment the next item on 1st db master server
server-id=1
# uncomment the next item on 2nd db master servers
#server-id=2

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: https://knowledge.broadcom.com/external/article?articleId=44402