Bug #72707 mysqlrplsync does not detect stopped slave server
Submitted: 21 May 2014 13:08 Modified: 13 Jan 2015 7:52
Reporter: Shahriyar Rzayev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Utilities Severity:S1 (Critical)
Version:1.4.2 OS:Linux (CentOS 6.5)
Assigned to: CPU Architecture:Any

[21 May 2014 13:08] Shahriyar Rzayev
Description:
When i stop slave as :

mysql> stop slave;

And used following syntax:

[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --slaves='remote':'$Slavepass45#'@192.168.1.88 -vvv

It shows warning as it must be:

WARNING: Slave not active '192.168.1.88@3306' - Sync skipped. 

But When i stopped Slave MySQL Server:

[root@linuxsrv4 ~]# service mysqld stop
Stopping mysqld:                                           [  OK  ]

And use again:
[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --slaves='remote':'$Slavepass45#'@192.168.1.88 -vvv
ERROR: Cannot connect to slave 192.168.1.88:3306 as user 'remote'.

1. So first of all it does not detect stopped MySQL Slave server. it simply shows same error when i don't provide password in --slaves option:

[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --slaves='remote':''@192.168.1.88 -vvv
ERROR: Cannot connect to slave 192.168.1.88:3306 as user 'remote'.

2. Another usage of this tool is as follows:

[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --discover-slaves-login='remote':'$Slavepass45#' -vvv
# Discovering slaves for master at localhost:3306
Error connecting to a slave as remote@192.168.1.88: Cannot connect to the slave server.
Error Can't connect to MySQL server on '192.168.1.88:3306' (111 Connection refused)

WARNING: There are slaves that had connection errors.
# Checking users permission to perform consistency check.
#
ERROR: No slaves found with GTID support and GTID_MODE=ON.

Error Can't connect to MySQL server on '192.168.1.88:3306' (111 Connection refused) ---> 111 Connection refused ---> So this error message is not related to MySQL When it is stopped. We see this message because of Iptables and etc. but not when MySQL stopped.

The related report: 
http://bugs.mysql.com/bug.php?id=72706

How to repeat:
All steps provided in description section.

Suggested fix:
Maybe some informative error handling messages.
[22 May 2014 9:37] MySQL Verification Team
Hello Shahriyar,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[11 Jun 2014 4:25] MySQL Verification Team
Bug #72769 marked as duplicate of this