L
L
Lisio2013-12-02 19:36:16
MySQL
Lisio, 2013-12-02 19:36:16

How to set up SST via xtrabackup between codership mysql galera nodes?

There is one working server with MySQL Galera and base (192.168.0.102), one server with empty MySQL Galera (192.168.0.103) and one more server with Galera Arbitrator (192.168.0.104), on which HAProxy will be installed later. Debian 7.1.0 is everywhere.
The main goal at the current stage is to make a cluster of two nodes and an arbitrator, but all attempts to do this end up with the fact that the SST method xtrabackup to the new server is not completely performed. Those. the entire database is replicated, but it is impossible to reach it.
nor through the console:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

not through scripts:
PHP Warning:  mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '192.168.0.103' (111)

In the logs, all entries end with the line:
131202 19:51:01 [Note] WSREP: Requesting state transfer: success, donor: 0

The cluster is in the following state:
wsrep_local_state_comment    | Donor/Desynced
wsrep_incoming_addresses     | 192.168.0.102:3306,,192.168.0.103:3306
wsrep_cluster_conf_id        | 3                                     
wsrep_cluster_size           | 3

Restarting the processes does nothing, the cluster falls into the same state, except that it no longer performs the actual data transfer, the databases are synchronized. If the second server is launched separately from the cluster, then it can be seen that the entire database has been copied, it can be accessed in any way.
First node config:
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=2G"
wsrep_cluster_name="clusterTest"
wsrep_cluster_address="gcomm://"
wsrep_node_name="node-1"
wsrep_node_address=192.168.0.102
wsrep_node_incoming_address=192.168.0.102
wsrep_slave_threads=16
wsrep_sst_method=xtrabackup
wsrep_sst_receive_address=192.168.0.102
wsrep_sst_auth=root:somepass

Second node config:
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=2G"
wsrep_cluster_name="clusterTest"
wsrep_cluster_address="gcomm://192.168.0.102"
wsrep_node_name="node-2"
wsrep_node_address=192.168.0.103
wsrep_node_incoming_address=192.168.0.103
wsrep_slave_threads=16
wsrep_sst_method=xtrabackup
wsrep_sst_receive_address=192.168.0.103
wsrep_sst_auth=root:somepass
wsrep_sst_donor="node-1"

If you use rsync instead of xtrabackup, then after SST the entire cluster works as expected. The feeling that xtrabackup after the transfer cannot complete any final steps.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question