Percona XtraDB Cluster : Cant join cluster

29 views
Skip to first unread message

Reth Kevin Bagares

unread,
Nov 28, 2019, 7:09:57 AM11/28/19
to Percona Discussion
I want to create a 2 node cluster, but it seems it did not join each other. How can I make this working, this is my code.

**Node1 : docker-compose.yml**

```version: '2'
services:
    percona-xtradb-cluster:
        container_name: node1
        image: 'percona/percona-xtradb-cluster:5.7'
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - CLUSTER_NAME=pxc-cluster

        ports:
            - 3306:3306
            - 4567:4567
            - 4568:4568
        volumes:
            - /home/vagrant/my.cnf:/etc/my.cnf
```
**Node2 : docker-compose.yml**

```version: '2'
services:
    percona-xtradb-cluster:
        container_name: node1
        image: 'percona/percona-xtradb-cluster:5.7'
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - CLUSTER_NAME=pxc-cluster
            - CLUSTER_JOIN=node1
        ports:
            - 3306:3306
            - 4567:4567
            - 4568:4568
        volumes:
            - /home/vagrant/my.cnf:/etc/my.cnf
```

**Node1 : my.cnf**

```[mysqld]

wsrep_provider=/usr/lib64/galera3/libgalera_smm.so

wsrep_cluster_address=gcomm://192.168.56.20,192.168.56.25

binlog_format=ROW

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2

wsrep_node_address=192.168.56.20

wsrep_cluster_name=pxc-cluster

wsrep_node_name=node1

pxc_strict_mode=ENFORCING

wsrep_sst_method=xtrabackup-v2

wsrep_sst_auth="sstuser:1q2w3e4r"

!include /etc/mysql/node.cnf
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/
```

**Node2 : my.cnf**

```[mysqld]

wsrep_provider=/usr/lib64/galera3/libgalera_smm.so

wsrep_cluster_address=gcomm://192.168.56.20,192.168.56.25

binlog_format=ROW

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2

wsrep_node_address=192.168.56.25

wsrep_cluster_name=pxc-cluster

wsrep_node_name=node2

pxc_strict_mode=ENFORCING

wsrep_sst_method=xtrabackup-v2

wsrep_sst_auth="sstuser:1q2w3e4r"

!include /etc/mysql/node.cnf
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/
```


Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. https://fligno.com

Reth Kevin Bagares

unread,
Nov 28, 2019, 7:09:57 AM11/28/19
to Percona Discussion
I want to create a 2 node cluster, but it seems it did not join each other. How can I make this working, this is my code.

Node1 : docker-compose.yml

version: '2'
services:
    percona-xtradb-cluster:
        container_name: node1
        image: 'percona/percona-xtradb-cluster:5.7'
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - CLUSTER_NAME=pxc-cluster

        ports:
            - 3306:3306
            - 4567:4567
            - 4568:4568
        volumes:
            - /home/vagrant/my.cnf:/etc/my.cnf

Node2 : docker-compose.yml

version: '2'
services:
    percona-xtradb-cluster:
        container_name: node1
        image: 'percona/percona-xtradb-cluster:5.7'
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - CLUSTER_NAME=pxc-cluster
            - CLUSTER_JOIN=node1
        ports:
            - 3306:3306
            - 4567:4567
            - 4568:4568
        volumes:
            - /home/vagrant/my.cnf:/etc/my.cnf


Node1 : my.cnf

[mysqld]

wsrep_provider=/usr/lib64/galera3/libgalera_smm.so

wsrep_cluster_address=gcomm://192.168.56.20,192.168.56.25

binlog_format=ROW

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2

wsrep_node_address=192.168.56.20

wsrep_cluster_name=pxc-cluster

wsrep_node_name=node1

pxc_strict_mode=ENFORCING

wsrep_sst_method=xtrabackup-v2

wsrep_sst_auth="sstuser:1q2w3e4r"

!include /etc/mysql/node.cnf
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/


Node2 : my.cnf

[mysqld]

wsrep_provider=/usr/lib64/galera3/libgalera_smm.so

wsrep_cluster_address=gcomm://192.168.56.20,192.168.56.25

binlog_format=ROW

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2

wsrep_node_address=192.168.56.25

wsrep_cluster_name=pxc-cluster

wsrep_node_name=node2

pxc_strict_mode=ENFORCING

wsrep_sst_method=xtrabackup-v2

wsrep_sst_auth="sstuser:1q2w3e4r"

!include /etc/mysql/node.cnf
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/
```
Reply all
Reply to author
Forward
0 new messages