# Clustering 3 node .Why this error  'Percona XtraDB Cluster Node is not synced or non-PRIM' .help me

**URL:** <https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [October 23, 2015, 3:03am UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472 "2015-10-23T03:03:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![magan](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@magan](https://forums.percona.com/u/magan)\
**Post date:** [October 23, 2015, 3:03am UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/1 "2015-10-23T03:03:11Z")

</div>

Hi,  
I am trying to setup Percona XtraDB Cluster 5.5 on 3 nodes. I am using ubuntu 12.04 precise.

Node 1: 192.168.X.A  
[mysqld]  
datadir=/var/lib/mysql  
user=mysql

# Path to Galera library

wsrep\_provider=/usr/lib/libgalera\_smm.so

# Cluster connection URL contains the IPs of node#1, node#2 and node#3

wsrep\_cluster\_address=gcomm://192.168.X.A,192.168.X.B,192.168.X.C

# In order for Galera to work correctly binlog format should be ROW

binlog\_format=ROW

# MyISAM storage engine has only experimental support

default\_storage\_engine=InnoDB

# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera

innodb\_autoinc\_lock\_mode=2

# Node #2 address

wsrep\_node\_address=192.168.X.A

# SST method

wsrep\_sst\_method=xtrabackup-v2

# Cluster name

wsrep\_cluster\_name=my\_ubuntu\_cluster

# Authentication for SST method

wsrep\_sst\_auth=“replica:replica123”

## #user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking … … … Node 2:192.168.X.B

[mysqld]  
datadir=/var/lib/mysql  
user=mysql

# Path to Galera library

wsrep\_provider=/usr/lib/libgalera\_smm.so

# Cluster connection URL contains the IPs of node#1, node#2 and node#3

wsrep\_cluster\_address=gcomm://192.168.X.B,192.168.X.A,192.168.X.C

# In order for Galera to work correctly binlog format should be ROW

binlog\_format=ROW

# MyISAM storage engine has only experimental support

default\_storage\_engine=InnoDB

# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera

innodb\_autoinc\_lock\_mode=2

# Node #2 address

wsrep\_node\_address=192.168.X.B

# SST method

wsrep\_sst\_method=xtrabackup-v2

# Cluster name

wsrep\_cluster\_name=my\_ubuntu\_cluster

# Authentication for SST method

wsrep\_sst\_auth=“replica:replica123”

## #user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking … … Node3 :192.168.X.C

[mysqld]  
datadir=/var/lib/mysql  
user=mysql

# Path to Galera library

wsrep\_provider=/usr/lib/libgalera\_smm.so

# Cluster connection URL contains the IPs of node#1, node#2 and node#3

wsrep\_cluster\_address=gcomm://192.168.X.C, 192.168.X.A, 192.168.X.B

# In order for Galera to work correctly binlog format should be ROW

binlog\_format=ROW

# MyISAM storage engine has only experimental support

default\_storage\_engine=InnoDB

# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera

innodb\_autoinc\_lock\_mode=2

# Node #2 address

wsrep\_node\_address=192.168.X.C

# SST method

wsrep\_sst\_method=xtrabackup-v2

# Cluster name

wsrep\_cluster\_name=my\_ubuntu\_cluster

# Authentication for SST method

wsrep\_sst\_auth=“replica:replica123”

#user = mysql  
pid-file = /var/run/mysqld/mysqld.pid  
socket = /var/run/mysqld/mysqld.sock  
port = 3306  
basedir = /usr  
datadir = /var/lib/mysql  
tmpdir = /tmp  
lc-messages-dir = /usr/share/mysql  
skip-external-locking

* * *

I stoped my mysql instance, There is NO another mysql stance running. Also i configured the Firewall by allowing the following ports for each node  
sudo ufw allow 3306/tcp  
sudo ufw allow 4567/tcp  
sudo ufw allow 4568/tcp  
sudo ufw allow 4444/tcp

Moreover, i bootstrapped all the 3 nodes after configuration by running as root : /etc/init.d/mysql bootstrap -pxc .

- -WHen i check the cluster, the cluster size is 1 instead of three. that means my nodes are synced, bu i dont know the problem.  
NOde 1;  
mysql\> SHOW STATUS like ‘%wsrep%’;  
±---------------------------±-------------------------------------+  
| Variable\_name | Value |  
±---------------------------±-------------------------------------+  
| wsrep\_local\_state\_uuid | 9cb8fb28-7870-11e5-b3fe-c28542dbd610 |  
| wsrep\_protocol\_version | 4 |  
| wsrep\_last\_committed | 5 |  
| wsrep\_replicated | 4 |  
| wsrep\_replicated\_bytes | 762 |  
| wsrep\_received | 12 |  
| wsrep\_received\_bytes | 916 |  
| wsrep\_local\_commits | 0 |  
| wsrep\_local\_cert\_failures | 0 |  
| wsrep\_local\_replays | 0 |  
| wsrep\_local\_send\_queue | 0 |  
| wsrep\_local\_send\_queue\_avg | 0.000000 |  
| wsrep\_local\_recv\_queue | 0 |  
| wsrep\_local\_recv\_queue\_avg | 0.000000 |  
| wsrep\_flow\_control\_paused | 0.000000 |  
| wsrep\_flow\_control\_sent | 0 |  
| wsrep\_flow\_control\_recv | 0 |  
| wsrep\_cert\_deps\_distance | 0.000000 |  
| wsrep\_apply\_oooe | 0.000000 |  
| wsrep\_apply\_oool | 0.000000 |  
| wsrep\_apply\_window | 0.000000 |  
| wsrep\_commit\_oooe | 0.000000 |  
| wsrep\_commit\_oool | 0.000000 |  
| wsrep\_commit\_window | 0.000000 |  
| wsrep\_local\_state | 4 |  
| wsrep\_local\_state\_comment | Synced |  
| wsrep\_cert\_index\_size | 0 |  
| wsrep\_causal\_reads | 0 |  
| wsrep\_incoming\_addresses | 192.168.1.31:3306 |  
| wsrep\_cluster\_conf\_id | 5 |  
| wsrep\_cluster\_size | 1 |  
| wsrep\_cluster\_state\_uuid | 9cb8fb28-7870-11e5-b3fe-c28542dbd610 |  
| wsrep\_cluster\_status | Primary |  
| wsrep\_connected | ON |  
| wsrep\_local\_bf\_aborts | 0 |  
| wsrep\_local\_index | 0 |  
| wsrep\_provider\_name | Galera |  
| wsrep\_provider\_vendor | Codership Oy \<info@codership.com\> |  
| wsrep\_provider\_version | 2.12(r318911d) |  
| wsrep\_ready | ON |  
| wsrep\_thread\_count | 2

* * *

When check cluster it says, ‘XtraDB Cluster Nod not synced’ and it is true because still my wsrep\_cluster\_size is 1 as seen in the above result.  
node1@ubuntu:~$ sudo clustercheck  
[sudo] password for node1:  
HTTP/1.1 503 Service Unavailable  
Content-Type: text/plain  
Connection: close  
Content-Length: 57

Percona XtraDB Cluster Node is not synced or non-PRIM.

i am confused i don’t what is wrong with it. i am beginner of this perconnaXtradb clustering. Please help me.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [October 26, 2015, 2:17am UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/2 "2015-10-26T02:17:05Z")

</div>

| wsrep\_cluster\_conf\_id | 5 |  
| wsrep\_cluster\_size | 1 |  
| wsrep\_cluster\_state\_uuid | 9cb8fb28-7870-11e5-b3fe-c28542dbd610 |  
| wsrep\_cluster\_status | Primary |  
| wsrep\_connected | ON |

You only need to bootstrap one node and then the other two nodes you need to start up normally.

Node1:

# service mysql start --bootstrap-pxc

Node2 and Node3:

# service mysql start

We recommend to use Percona XtraDB Cluster 5.6 as much as possible.

---

<div class="post-metadata">

**Author:** ![magan](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@magan](https://forums.percona.com/u/magan)\
**Post date:** [November 2, 2015, 10:12pm UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/3 "2015-11-02T22:12:39Z")

</div>

Dear [jrivera](https://percona.vanillacommunities.com/profile/x/x/21266) I changed to Percona XtraDB Cluster 5.6 , but now when I bootstrap the first node using (service mysql start --bootstrap-pxc) or start the other two nodes using (service mysql start), I am getting the below error message:  
… …  
sudo service mysql start

- Starting MySQL (Percona XtraDB Cluster) database server mysqld
- The server quit without updating PID file (/var/run/mysqld/mysqld.pid).  
[COLOR=#FF0000] [fail]  
… … …  
Is there any help to solve this?

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [November 2, 2015, 10:26pm UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/4 "2015-11-02T22:26:48Z")

</div>

you need to check the logs from the bootstrapped node. did node1 (the node you bootstrapped) start up or not? The output you shared does not help in diagnosing the problem. As with anything else, the error log is your friend it will give you an idea on what the problem is and how to resolve it.

---

<div class="post-metadata">

**Author:** ![magan](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@magan](https://forums.percona.com/u/magan)\
**Post date:** [November 11, 2015, 10:04pm UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/5 "2015-11-11T22:04:17Z")

</div>

Dear [jrivera](https://percona.vanillacommunities.com/profile/x/x/21266) thank your for your generous help. now my 3 node cluster is working fine. But I have problem regarding to accessing the cluster. when I try to log in it gives error message:  
ERROR 1129 (HY000): Host ‘192.168.40.3’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’

but it needs to be used MySQL \>Flush hosts on any one of them and it works in that way. My question is: since using ‘flush hosts’ is trivial work that needs to be done each time this error happens, is there a better alternative way of solving this issue?  
Thanks you.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [November 12, 2015, 12:44am UTC](https://forums.percona.com/t/clustering-3-node-why-this-error-percona-xtradb-cluster-node-is-not-synced-or-non-prim-help-me/4472/6 "2015-11-12T00:44:26Z")

</div>

Try increasing max\_connect\_errors, from the manual [url][https://dev.mysql.com/doc/refman/5.6/en/blocked-host.html[/url]](https://dev.mysql.com/doc/refman/5.6/en/blocked-host.html%5B/url%5D)
