1 year ago

#123820

test-img

Yashar

Cannot connect to mysql group replication instance on openshift

I have deployed a MySQL server (bitnami helmchart) to an openshift cluster (version 8.0.25-debian-10-r16) and made a group replication cluster using docs here: https://dev.mysql.com/doc/refman/8.0/en/group-replication.html

The Mysql server bootstraps the group replication without any problems:

mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST   | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
+---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+
| group_replication_applier | be431342-8366-11ec-bea6-ea1fb6641f44 | mysql-0       |        3306 | ONLINE       | PRIMARY     | 8.0.25         |
+---------------------------+--------------------------------------+---------------+-------------+--------------+-------------+----------------+
1 row in set (0.02 sec)

and now I want to join another MySQL instance on a VM, to do so, first I create a LoadBalancer service to access the MySQL ports outside of the openshift cluster. And I can telnet both 3306 and 33061 from the VM. But when I create replication users on the Mysql instance on the VM and start the replication with START GROUP_REPLICATION USER='rpl_user', PASSWORD='password'; I get the below error on the vm's logs:

[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 33061'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
[ERROR] [MY-011640] [Repl] Plugin group_replication reported: 'Timeout on wait for view after joining group'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member is already leaving or joining a group.'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 33061'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'

The VM's IP address is in the whitelist of the MySQL deployed on openshift and I don't see any errors on the Mysql's pod

Here is the Mysql configuration on the openshift:

    [mysqld]
    disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
    server_id=1
    gtid_mode=ON
    enforce_gtid_consistency=ON
    binlog_checksum=NONE
    plugin_load_add='group_replication.so'
    group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    group_replication_start_on_boot=off
    group_replication_local_address= "mysql-0:33061"
    group_replication_ip_allowlist= "172.16.0.0/12"
    group_replication_group_seeds= "172.16.60.5:33061,172.20.1.223:33061"
    group_replication_bootstrap_group=off
    bind-address=0.0.0.0
    default_authentication_plugin=mysql_native_password
    skip-name-resolve
    explicit_defaults_for_timestamp
    basedir=/opt/bitnami/mysql
    plugin_dir=/opt/bitnami/mysql/lib/plugin
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    datadir=/bitnami/mysql/data
    tmpdir=/opt/bitnami/mysql/tmp
    max_allowed_packet=16M
    bind-address=0.0.0.0
    pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
    log-error=/opt/bitnami/mysql/logs/mysqld.log
    character-set-client-handshake = FALSE
    character-set-server=utf8mb4
    collation-server=utf8mb4_unicode_ci

    [mysql]
    default-character-set = utf8mb4

    [client]
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    default-character-set=utf8mb4
    plugin_dir=/opt/bitnami/mysql/lib/plugin

    [manager]
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    pid-file=/opt/bitnami/mysql/tmp/mysqld.pid

Mysql configuration on the VM:

[mysqld]
#
# * Basic Settings
#
user        = mysql
server_id=2
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
plugin_load_add='group_replication.so'
group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
group_replication_start_on_boot=off
group_replication_local_address= "mysql-1:33061"
group_replication_ip_allowlist= "172.16.0.0/12"
group_replication_group_seeds= "172.16.60.5:33061,172.20.1.223:33061"
group_replication_bootstrap_group=off
default_authentication_plugin=mysql_native_password
skip-name-resolve
explicit_defaults_for_timestamp
port=3306
socket=/var/run/mysqld/mysqld.sock
datadir=/var/lib/mysql
tmpdir=/tmp
max_allowed_packet=16M
bind-address=0.0.0.0
pid-file=/var/run/mysqld/mysqld.pid
log_error = /var/log/mysql/error.log
character-set-server=UTF8
collation-server=utf8_general_ci

[client]
port=3306
socket=/var/run/mysqld/mysqld.sock
default-character-set=UTF8

[manager]
port=3306
socket=/var/run/mysqld/mysqld.sock
pid-file=/var/run/mysqld/mysqld.pid

Here 172.16.60.5 is the loadbalancer IP for MySQL on openshift and 172.20.1.223 is the IP of MySQL on the VM, both of them can see each other on ports 3306 and 33061

mysql

openshift

mysql-group-replication

0 Answers

Your Answer

Accepted video resources