Bug #72706 mysqlrplsync: Cannot connect to the slave server. Unclear connection message.
Submitted: 21 May 2014 12:05 Modified: 16 Jul 2014 0:52
Reporter: Shahriyar Rzayev Email Updates:
Status: Closed 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 12:05] Shahriyar Rzayev
Description:
Dear all,

i am testing mysqlrplsync introduced in 1.4.2 rc release.
I have 2 MySQL 5.6.17 GA servers as master->slave.
Master host IP: 192.168.1.77 (hostname: linuxsrv3)
Slave host IP: 192.168.1.88  (hostname: linuxsrv4)

And it is working without any problem.
Here is the portion from master's my.cnf:

# BINARY LOGGING #
server_id                      = 1
log_bin                        = /var/lib/mysql/data/mysql-bin
log_bin_index                  = /var/lib/mysql/data/mysql-bin
expire_logs_days               = 14
sync_binlog                    = 1
binlog_format                  = row
gtid-mode                      = on                             
enforce-gtid-consistency       = true           
master-info-repository         = TABLE            
relay-log-info-repository      = TABLE         
slave-parallel-workers         = 2               
binlog-checksum                = CRC32                  
master-verify-checksum         = 1                
slave-sql-verify-checksum      = 1             
binlog-rows-query-log_events   = 1
log_slave_updates              = 1

Here is from slave's my.cnf:

# BINARY LOGGING #

server_id                      = 2
report_host                    = 192.168.1.88
log_bin                         = /var/lib/mysql/data/mysql-bin
log_bin_index                  = /var/lib/mysql/data/mysql-bin
expire_logs_days               = 14
sync_binlog                    = 1
binlog_format                  = row
relay_log                      = /var/lib/mysql/data/mysql-relay-bin
log_slave_updates              = 1
read_only                      = 1
gtid-mode                      = on
enforce-gtid-consistency       = true
master-info-repository         = TABLE
relay-log-info-repository      = TABLE
#slave-parallel-workers         = 2
binlog-checksum                = CRC32
master-verify-checksum         = 1
slave-sql-verify-checksum      = 1
binlog-rows-query-log_events   = 1

In fact slave is connected to master:

mysql> show slave hosts\G
*************************** 1. row ***************************
 Server_id: 2
      Host: 192.168.1.88
      Port: 3306
 Master_id: 1
Slave_UUID: 5a70670a-d99e-11e3-8dea-080027304b04
1 row in set (0,00 sec)

When i use with following syntax it works well:

[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --slaves='remote':'$Slavepass45#'@192.168.1.88 -vvv
# Checking users permission to perform consistency check.
#
#
# GTID differences between Master and Slaves:
# - Slave '192.168.1.88@3306' is 9674 transactions behind Master.
#       Missing GTIDs: 1f29cdda-d5ac-11e3-b42e-0800274da480:1-9674
#
# Checking data consistency.
.
.
#...done.
#
# SUMMARY: 1 data consistency issue found.
#

But with following syntax i have encountered an issue:

[root@linuxsrv3 ~]# mysqlrplsync --master=root:12345@localhost  --discover-slaves-login='remote':'$Slavepass45#' -vvv
# Discovering slaves for master at localhost:3306

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.

There is no valuable debug information here so, i decide to mistype password:

[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 Access denied for user 'remote'@'192.168.1.77' (using password: YES)

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.

So going further there is a connection here:

"Error connecting to a slave as remote@192.168.1.88: Cannot connect to the slave server" -> it really unclear what kind of connection it is.
And again there is another connection as 'remote'@'192.168.1.77'.

How to repeat:
Setup manually master->slave replication with my.cnfs that i stated in desctiption section.
Then Try to use:

1.
mysqlrplsync --master=root:12345@localhost  --discover-slaves-login='remote':'$Slavepass45#' -vvv

2.
mysqlrplsync --master=root:12345@localhost  --discover-slaves-login='remote':'Slavepass45#' -vvv

Suggested fix:
No idea
[22 May 2014 9:38] MySQL Verification Team
Hello Shahriyar,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[16 Jul 2014 0:52] Philip Olson
Fixed as of the upcoming MySQL Utilities/Fabric 1.4.4 release, and here's the changelog entry:

With the "--discover-slaves-login" option, if there were connection or
configuration problems with some of the slaves, then those slaves were
skipped with only a generic error message being issued. This behavior did
not change when also passing in "--verbose". 

A simple warning about the connection/configuration problems is now generated
during the discovery process, and it references including "--verbose" to
see additional information. The "--verbose" option generates specific
information for each slave, and includes their respective errors.

Thank you for the bug report.