Bug #84313 mysql group replication should not rely on hostnames
Submitted: 22 Dec 2016 9:32 Modified: 9 Jan 2017 18:14
Reporter: Bjoern Boschman (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7.17 OS:Debian
Assigned to: MySQL Verification Team CPU Architecture:Any

[22 Dec 2016 9:32] Bjoern Boschman
Description:
mysql group_replication setup on some spawned virtual machines
VMs are:
* mysql1
* mysql2
* mysql3

name resolution is _not_ working, but names are nowhere configured

while trying to setup additional nodes the following error occurs:

2016-12-22T09:12:42.030488Z 36 [ERROR] Slave I/O for channel 'group_replication_recovery': error connecting to master 'rpl_user@mysql1:3306' - retry-time: 60  retries: 1, Error_code: 2003

Seems to me that joining node tries to connect to mysqld port 3306/tcp via hostname lookup. this seem to come from gethostbyname() which is *not* reliable 

How to repeat:
used GR specific configuration:

[mysqld]

server-id=3
gtid_mode=ON
enforce_gtid_consistency=ON
master_info_repository=TABLE
relay_log_info_repository=TABLE
binlog_checksum=NONE
log_slave_updates=ON
log_bin=binlog
binlog_format=ROW
plugin-load=group_replication.so
transaction_write_set_extraction=XXHASH64

group_replication_group_name = c964fb70-4126-542a-bc10-7e5082edfb2f
group_replication_recovery_retry_count = 2
group_replication_recovery_reconnect_interval = 120
group_replication_start_on_boot = off
group_replication_local_address = "192.168.241.103:6606"
group_replication_bootstrap_group = off
group_replication_single_primary_mode = FALSE
group_replication_enforce_update_everywhere_checks = TRUE
group_replication_group_seeds= "192.168.241.101:6606,192.168.241.102:6606,192.168.241.103:6606"

Suggested fix:
use the same IP as configured in group_replication_group_seeds
please try to avoid gethostbyname() which is *not* reliable (e.g. cloned VMs)
[9 Jan 2017 18:14] Nuno Carvalho
Duplicate of BUG#83128: Group Replication depends on resolvable hostnames without domain