Unable to add mysql node to percona cluster

Getting the below error while trying to add a node to the cluster
[![enter image description here][1]][1]

I have the below config settings

Node1(boot strapped node)

[client]
socket=/var/lib/mysql/mysql.sock
port = 3306
[mysqld]
server-id=2
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default_storage_engine = InnoDB
binlog_expire_logs_seconds=604800
wsrep_provider=/usr/lib64/galera4/libgalera_smm.so
wsrep_cluster_address=gcomm://172.32.17.83:3306,172.32.20.122:3306,10.0.168.105:3306
binlog_format=ROW
wsrep_slave_threads=8
wsrep_log_conflicts
innodb_autoinc_lock_mode=2
wsrep_node_address=172.32.20.122
wsrep_cluster_name=percona
pxc_strict_mode=ENFORCING
wsrep_sst_method=xtrabackup-v2

Node 2:

[client]
socket=/var/lib/mysql/mysql.sock
port = 3306
[mysqld]
server-id=1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default_storage_engine = InnoDB
binlog_expire_logs_seconds=604800
wsrep_provider=/usr/lib64/galera4/libgalera_smm.so
wsrep_cluster_address=gcomm://172.32.17.83:3306,172.32.20.122:3306,10.0.168.105:3306
binlog_format=ROW
wsrep_slave_threads=8
wsrep_log_conflicts
innodb_autoinc_lock_mode=2
wsrep_node_address=172.32.17.83
wsrep_cluster_name=percona
wsrep_node_name=ip-172-32-17-83.eu-west-1.compute.internal
pxc_strict_mode=ENFORCING
wsrep_sst_method=xtrabackup-v2x

I have tried adding the entries of port 4567 to the IPtables and disable the firewall and run service mysql start
The SHOW STATUS LIKE ‘wsrep%’; status is showing as primary
Any help would be appreciated

1 Like

Hello @maddy0429

You are using wrong port for Galera group communication, don’t use 3306 port in below option,
wsrep_cluster_address=gcomm://<ip_addr>:3306,<ip_addr>:3306,<ip_addr>:3306

It should be like the below,
wsrep_cluster_address=gcomm://<ip_addr>,<ip_add>,<ip_addr>

and by default, it will use a group communication port (default is 4567).

You will find more details about port for PXC in Frequently Asked Questions - Percona XtraDB Cluster

Ref: wsrep_cluster_address option

1 Like

Thank you @lalit.choudhary
I have tried the below and still getting the same error
wsrep_cluster_address=gcomm://172.32.17.83,172.32.20.122,10.0.168.105

1 Like

@maddy0429
next, you should try troubleshooting the connection issue using telnet between these nodes and all required ports mentioned in the below docs,

example:
telnet node_ip_addr:3306
telnet node_ip_addr:4567

Also, please do not add your actual IP addresses in public forums you can edit your comment and redact IP information.

1 Like