Bug #90483 dns based seeds resolving to itself causes GR to not start
Submitted: 17 Apr 2018 23:54 Modified: 7 Aug 2018 8:57
Reporter: Kenny Gryp Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:5.7.21, 8.0.4 OS:CentOS
Assigned to: CPU Architecture:Any

[17 Apr 2018 23:54] Kenny Gryp
Description:
When group_replication_group_seeds contains a DNS based entry which resolves to it's on mysql daemon, group replication will be stuck.

How to repeat:
Configure a cluster with the following settings:
group_replication_group_seeds = node1:33061,192.168.70.3:33061,192.168.70.4:33061
group_replication_local_address = 192.168.70.2:33061

node1 resolves to the local_address:

[vagrant@node1 ~]$ ping node1
PING node1 (192.168.70.2) 56(84) bytes of data.
64 bytes from node1 (192.168.70.2): icmp_seq=1 ttl=64 time=0.037 ms

Start mysqld....
[vagrant@node1 ~]$ sudo systemctl startmysqld

2018-04-17T23:47:50.363211Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:51.364423Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:52.365145Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:53.366502Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:54.367439Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:55.368875Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:56.369894Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:57.370603Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:58.371111Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
2018-04-17T23:47:59.371489Z 0 [Note] [MY-011254] Plugin group_replication reported: '[GCS] cli_err 2'
...

The only way to stop this is to run:
[vagrant@node1 ~]$ sudo pkill -9 mysqld

(stopping mysqld doesn't work)

You don't have this problem when putting in the IP Address, the cluster does not connect to itself to join a GR cluster

Suggested fix:
A node should figure out if it is connection to itself and move on to the next.
[18 Apr 2018 0:03] Kenny Gryp
.
[18 Apr 2018 14:23] Bogdan Kecman
Hi,
Thanks for the submission. Verified as described.
I'm not sure I agree that the bug is that it's not figuring out it's connecting to itself but it should not get stuck so that's def. a bug imo.

all best
Bogdan
[7 Aug 2018 8:57] David Moss
Posted by developer:
 
Thank you for your feedback, this has been fixed in upcoming versions and the following was added to the 5.7.24 changelog:
When group_replication_group_seeds contained a DNS based entry which resolved to its own local address, Group Replication could not start.