# How to reset Percona XtraDB Cluster on all nodes?

**URL:** <https://forums.percona.com/t/how-to-reset-percona-xtradb-cluster-on-all-nodes/5270>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [December 7, 2016, 4:33pm UTC](https://forums.percona.com/t/how-to-reset-percona-xtradb-cluster-on-all-nodes/5270 "2016-12-07T16:33:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![porunov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/porunov/32/1154_2.png) [@porunov](https://forums.percona.com/u/porunov)\
**Post date:** [December 8, 2016, 11:46am UTC](https://forums.percona.com/t/how-to-reset-percona-xtradb-cluster-on-all-nodes/5270/3 "2016-12-08T11:46:45Z")

</div>

Thank you for your suggestion! Unfortunately I have problems with bootstrapping. The problem is that it can’t be bootstrap till mysql is alive. But I can’t stop/kill mysql because it waiting for something. I tried different ways to stop mysql but without success. Here is what I tried:  
systemctl stop mysql

it fails.

killall -KILL mysql mysqld\_safe mysqld

it kills mysql for about 2 seconds and them mysql is recreated. So, I have no time to use:  
systemctl start [mysql&#64;bootstrap.service](mailto:mysql&#64;bootstrap.service)

Also I tried  
kill -9 PID  
and  
kill -15 PID

The same result as with “killall -KILL”

Then I tried:  
/usr/local/mysql/bin/mysqladmin -u root -p shutdown

It shows:  
mysqladmin: connect to server at ‘localhost’ failed  
error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’  
Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!

I tried to start it with:  
systemctl start mysql

But of course it doesn’t work if the full cluster aren’t connected together.

Then I tried:  
/usr/bin/mysqld\_multi stop

None output..

# /usr/bin/mysqld\_safe stop

2016-12-08T16:55:35.218919Z mysqld\_safe Logging to ‘/var/log/mysqld.log’.  
2016-12-08T16:55:35.239877Z mysqld\_safe Starting mysqld daemon with databases from /var/lib/mysql  
2016-12-08T16:55:35.249570Z mysqld\_safe Skipping wsrep-recover for 43de3d74-bca8-11e6-a178-57b39b925285:9 pair  
2016-12-08T16:55:35.250808Z mysqld\_safe Assigning 43de3d74-bca8-11e6-a178-57b39b925285:9 to wsrep\_start\_position  
2016-12-08T16:55:36.470775Z mysqld\_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

If we see log file. We will notice that after mysql stop it recovers (immortal mysql):

2016-12-08T16:56:13.471971Z 0 [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory)  
2016-12-08T16:56:13.471980Z 0 [Note] WSREP: restore pc from disk failed  
2016-12-08T16:56:13.472480Z 0 [Note] WSREP: GMCast version 0  
2016-12-08T16:56:13.472706Z 0 [Note] WSREP: (3a0efa51, ‘tcp://0.0.0.0:4567’) listening at tcp://0.0.0.0:4567  
2016-12-08T16:56:13.472717Z 0 [Note] WSREP: (3a0efa51, ‘tcp://0.0.0.0:4567’) multicast: , ttl: 1  
2016-12-08T16:56:13.473082Z 0 [Note] WSREP: EVS version 0  
2016-12-08T16:56:13.473168Z 0 [Note] WSREP: gcomm: bootstrapping new group ‘pxc-cluster’  
2016-12-08T16:56:13.473208Z 0 [Note] WSREP: start\_prim is enabled, turn off pc\_recovery  
2016-12-08T16:56:13.473317Z 0 [ERROR] WSREP: Address already in use  
2016-12-08T16:56:13.473463Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 98: error while trying to listen ‘tcp://0.0.0.0:4567?socket.non\_blocking=1’, asio error ‘Address already in use’: 98 (Address already in use)  
at gcomm/src/asio\_tcp.cpp:listen():816  
2016-12-08T16:56:13.473479Z 0 [ERROR] WSREP: gcs/src/gcs\_core.cpp:gcs\_core\_open():208: Failed to open backend connection: -98 (Address already in use)  
2016-12-08T16:56:13.473527Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs\_open():1407: Failed to open channel ‘pxc-cluster’ at ‘gcomm://192.168.0.120,192.168.0.121,192.168.0.122’: -98 (Address already in use)  
2016-12-08T16:56:13.473537Z 0 [ERROR] WSREP: gcs connect failed: Address already in use  
2016-12-08T16:56:13.473543Z 0 [ERROR] WSREP: wsrep::connect(gcomm://192.168.0.120,192.168.0.121,192.168.0.122) failed: 7  
2016-12-08T16:56:13.473548Z 0 [ERROR] Aborting

2016-12-08T16:56:13.473559Z 0 [Note] Forcefully disconnecting 0 remaining clients  
2016-12-08T16:56:13.473563Z 0 [Note] WSREP: Service disconnected.  
2016-12-08T16:56:14.474088Z 0 [Note] WSREP: Some threads may fail to exit.  
2016-12-08T16:56:14.474182Z 0 [Note] Binlog end  
2016-12-08T16:56:14.474392Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2016-12-08T16:56:14.497916Z mysqld\_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended  
2016-12-08T16:56:22.669108Z 0 [Note] WSREP: view((empty))  
2016-12-08T16:56:22.669398Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)  
at gcomm/src/pc.cpp:connect():162  
2016-12-08T16:56:22.669439Z 0 [ERROR] WSREP: gcs/src/gcs\_core.cpp:gcs\_core\_open():208: Failed to open backend connection: -110 (Connection timed out)  
2016-12-08T16:56:22.669843Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs\_open():1407: Failed to open channel ‘pxc-cluster’ at ‘gcomm://192.168.0.120,192.168.0.121,192.168.0.122’: -110 (Connection timed out)  
2016-12-08T16:56:22.669880Z 0 [ERROR] WSREP: gcs connect failed: Connection timed out  
2016-12-08T16:56:22.669900Z 0 [ERROR] WSREP: wsrep::connect(gcomm://192.168.0.120,192.168.0.121,192.168.0.122) failed: 7  
2016-12-08T16:56:22.669912Z 0 [ERROR] Aborting

2016-12-08T16:56:22.669938Z 0 [Note] Forcefully disconnecting 0 remaining clients  
2016-12-08T16:56:22.669951Z 0 [Note] WSREP: Service disconnected.  
2016-12-08T16:56:23.673653Z 0 [Note] WSREP: Some threads may fail to exit.  
2016-12-08T16:56:23.673688Z 0 [Note] Binlog end  
2016-12-08T16:56:23.673800Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2016-12-08T16:56:23.689228Z mysqld\_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended  
2016-12-08T16:56:23.764524Z mysqld\_safe Starting mysqld daemon with databases from /var/lib/mysql  
2016-12-08T16:56:23.773417Z mysqld\_safe Skipping wsrep-recover for 43de3d74-bca8-11e6-a178-57b39b925285:9 pair  
2016-12-08T16:56:23.774686Z mysqld\_safe Assigning 43de3d74-bca8-11e6-a178-57b39b925285:9 to wsrep\_start\_position  
2016-12-08T16:56:23.942531Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit\_defaults\_for\_timestamp server option (see documentation for more details).  
2016-12-08T16:56:23.943450Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.14-8-57-log) starting as process 20603 …  
2016-12-08T16:56:23.945460Z 0 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use ‘–log-bin=GlusterDC1\_1-bin’ to avoid this problem.  
2016-12-08T16:56:23.945632Z 0 [Note] WSREP: Read nil XID from storage engines, skipping position init  
2016-12-08T16:56:23.945643Z 0 [Note] WSREP: wsrep\_load(): loading provider library ‘/usr/lib64/galera3/libgalera\_smm.so’  
2016-12-08T16:56:23.948918Z 0 [Note] WSREP: wsrep\_load(): Galera 3.17(r447d194) by Codership Oy \<info@codership.com\> loaded successfully.  
2016-12-08T16:56:23.948967Z 0 [Note] WSREP: CRC-32C: using hardware acceleration.  
2016-12-08T16:56:23.949262Z 0 [Note] WSREP: Found saved state: 43de3d74-bca8-11e6-a178-57b39b925285:9  
2016-12-08T16:56:23.949709Z 0 [Note] WSREP: Passing config to GCS: base\_dir = /var/lib/mysql/; base\_host = 192.168.0.120; base\_port = 4567; cert.log\_conflicts = no; debug = no; evs.auto\_evict = 0; evs.delay\_margin = PT1S; evs.delayed\_keep\_period = PT30S; evs.inactive\_check\_period = PT0.5S; evs.inactive\_timeout = PT15S; evs.join\_retrans\_period = PT1S; evs.max\_install\_timeouts = 3; evs.send\_window = 4; evs.stats\_report\_period = PT1M; evs.suspect\_timeout = PT5S; evs.user\_send\_window = 2; evs.view\_forget\_timeout = PT24H; gcache.dir = /var/lib/mysql/; gcache.keep\_pages\_count = 0; gcache.keep\_pages\_size = 0; gcache.mem\_size = 0; gcache.name = /var/lib/mysql//galera.cache; gcache.page\_size = 128M; gcache.size = 128M; gcomm.thread\_prio = ; gcs.fc\_debug = 0; gcs.fc\_factor = 1.0; gcs.fc\_limit = 16; gcs.fc\_master\_slave = no; gcs.max\_packet\_size = 64500; gcs.max\_throttle = 0.25; gcs.recv\_q\_hard\_limit = 9223372036854775807; gcs.recv\_q\_soft\_limit = 0.25; gcs.sync\_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce\_timeout = PT3S; pc.checksum = fa  
2016-12-08T16:56:23.960759Z 0 [Note] WSREP: Service thread queue flushed.  
2016-12-08T16:56:23.960806Z 0 [Note] WSREP: Assign initial position for certification: 9, protocol version: -1  
2016-12-08T16:56:23.960822Z 0 [Note] WSREP: wsrep\_sst\_grab()  
2016-12-08T16:56:23.960827Z 0 [Note] WSREP: Start replication  
2016-12-08T16:56:23.960839Z 0 [Note] WSREP: Setting initial position to 43de3d74-bca8-11e6-a178-57b39b925285:9  
2016-12-08T16:56:23.960944Z 0 [Note] WSREP: protonet asio version 0  
2016-12-08T16:56:23.961054Z 0 [Note] WSREP: Using CRC-32C for message checksums.  
2016-12-08T16:56:23.961091Z 0 [Note] WSREP: backend: asio  
2016-12-08T16:56:23.961142Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0

Also I tried:

# /usr/bin/mysql-systemd stop

SUCCESS! Stopping Percona XtraDB Cluster…

It is just words which mysql prints they mean nothing because mysql is still alive and broken.

# ps -ef | grep ‘mysql’

root 22823 1 0 19:02 ? 00:00:00 /bin/sh /usr/bin/mysqld\_safe --basedir=/usr --wsrep-new-cluster  
mysql 23236 22823 0 19:02 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --wsrep-provider=/usr/lib64/galera3/libgalera\_smm.so --wsrep-new-cluster --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock --wsrep\_start\_position=43de3d74-bca8-11e6-a178-57b39b925285:9  
root 23519 3143 0 19:05 pts/0 00:00:00 grep --color=auto mysql

---

_[View the full topic](https://forums.percona.com/t/how-to-reset-percona-xtradb-cluster-on-all-nodes/5270)._
