1

We are using monitoring software that is throwing an error saying that Slave_IO_Running is returning No for replication on our master server. It is in fact true that when running show slave status on the master server, that Slave_IO_Running shows No but Slave_SQL_Running shows Yes.

I understand that the show slave status command needs to be run on the slave server, and not the master and that any server can be a master and/or slave. To my knowledge, this server is truly only a master and doesn't serve as a slave to any other server.

I'm wondering why the monitoring software is showing this as a critical error, and if it is any cause for concern. Replication is running smoothly as far as I can tell, but looking to clear up this error from the monitoring software. Am I right in that, if this is the master server, Slave_IO_Running: No as well as any other output from show_slave_status on the master isn't meaningful?

1 Answer 1

1

MASTER / SLAVE REPLICATION

In Master/Slave Replication, you should not have any output from SHOW SLAVE STATUS\G on the Master. If you see any output, it is more than likely stale and no longer needed. You can remove that with the following commands

STOP SLAVE;
RESET SLAVE ALL;

After running these commands on the Master, you should get this from SHOW SLAVE STATUS\G

mysql> show slave status\G
Empty set (0.00 sec)

mysql>

WARNING !!! : Do not run those commands on the Slave (Breaks Replication)

MASTER / MASTER REPLICATION

In Master/Master Replication, both Masters are Slaves to Each Other. If your DB Topology is Master/Master Replication, then this is a legitimate error condition. The message Slave_IO_Runninng: Yes means there is a DB Connection going to another DB Server and collecting binlog events that have executed on that other DB Server already. When you have Slave_IO_Runninng: No, there is no DB Connection back to the other DB Server.

This be remedied with START SLAVE; but please find out why (Firewall Issue, Network Outage Between Servers, etc) before running that.

YOUR ACTUAL QUESTION

You asked

Am I right in that, if this is the master server, Slave_IO_Running: No as way as any other output from show_slave_status on the master isn't meaningful?

Output from SHOW SLAVE STATUS\G on a Master that is Master/Slave Replication (and not in Master/Master Replication) is not meaningful. You can run STOP SLAVE; RESET SLAVE ALL; on that Master so the monitoring software can stop alerting you.

6
  • Thank you for the answer. I was unaware of the master/master type relationship. Is there a way of checking if the servers are in fact in a master/master replication setup? Commented Nov 30, 2021 at 16:41
  • 1) See if log_slave_updates is configured (in /etc/my.cnf) on that Master. 2) Look for Relay Logs files on the Master (If you have them check the file timestamp to see how long ago replication was last runnng) 3) Check if there is any Topology management tools looking over the DB Servers (Orchestrator, ProxySQL, MHA,, etc) Commented Nov 30, 2021 at 16:49
  • CAPTAIN's LOG SUPPLIEMENTAL : Run SHOW GLOBAL VARIABLES LIKE '%gtid%'; to see if GTID Replication is in place Commented Nov 30, 2021 at 16:51
  • So I didn't see log_slave_updates anywhere in the cnf file. However, I do see a few files in the bin log directory that look like relay logs. There's only two though and their timestamps are from a month ago: mysql-relay-bin-000003, mysql-relay-bin-000004, and mysql-relay-bin.index. Commented Nov 30, 2021 at 18:00
  • After seeing those I'm guessing it's just artifacts of incorrectly setting up from a bit ago, after running the stop slave and reset slave all commands the output shows up empty now. Thanks! Commented Nov 30, 2021 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.