U
U
u00002020-05-22 15:11:34
MySQL
u0000, 2020-05-22 15:11:34

Why can't replication work for perkona?

I can't set up replication, because who the hell knows why.) It doesn't write anything worthwhile in the error log.

config one:

[client]
socket=/var/run/mysqld/mysqld.sock

[mysqld]
server-id=1
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
log-error=/var/log/mysql/error.log
pid-file=/var/run/mysqld/mysqld.pid
binlog_expire_logs_seconds=604800
wsrep_provider=/usr/lib/galera4/libgalera_smm.so
wsrep_cluster_address=gcomm://10.0.0.4,10.0.0.5,10.0.0.6
binlog_format=ROW
wsrep_slave_threads=8
wsrep_log_conflicts
innodb_autoinc_lock_mode=2
wsrep_cluster_name=cluster-1
wsrep_node_name=n1
wsrep_node_address=10.0.0.4
pxc_strict_mode=ENFORCING
wsrep_sst_method=xtrabackup-v2
wsrep_provider_options=”socket.ssl_key=server-key.pem;socket.ssl_cert=server-cert.pem;socket.ssl_ca=ca.pem”
log_error = /var/log/mysql/error.log

[sst]
encrypt=4
ssl-key=server-key.pem
ssl-ca=ca.pem
ssl-cert=server-cert.pem


Config 2:
[client]
socket=/var/run/mysqld/mysqld.sock

[mysqld]
server-id=2
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
log-error=/var/log/mysql/error.log
pid-file=/var/run/mysqld/mysqld.pid
binlog_expire_logs_seconds=604800
wsrep_provider=/usr/lib/galera4/libgalera_smm.so
wsrep_cluster_address=gcomm://10.0.0.4,10.0.0.5,10.0.0.6
binlog_format=ROW
wsrep_slave_threads=8
wsrep_log_conflicts
innodb_autoinc_lock_mode=2
wsrep_cluster_name=cluster-1
wsrep_node_name=n2
wsrep_node_address=10.0.0.6
pxc_strict_mode=ENFORCING
wsrep_sst_method=xtrabackup-v2
wsrep_provider_options=”socket.ssl_key=server-key.pem;socket.ssl_cert=server-cert.pem;socket.ssl_ca=ca.pem”
log_error = /var/log/mysql/error.log

[sst]
encrypt=4
ssl-key=server-key.pem
ssl-ca=ca.pem
ssl-cert=server-cert.pem


config three:
[client]
socket=/var/run/mysqld/mysqld.sock

[mysqld]
server-id=3
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
log-error=/var/log/mysql/error.log
pid-file=/var/run/mysqld/mysqld.pid
binlog_expire_logs_seconds=604800
wsrep_provider=/usr/lib/galera4/libgalera_smm.so
wsrep_cluster_address=gcomm://10.0.0.4,10.0.0.5,10.0.0.6
binlog_format=ROW
wsrep_slave_threads=8
wsrep_log_conflicts
innodb_autoinc_lock_mode=2
wsrep_cluster_name=cluster-1
wsrep_node_name=n3
wsrep_node_address=10.0.0.5
pxc_strict_mode=ENFORCING
wsrep_sst_method=xtrabackup-v2
wsrep_provider_options=”socket.ssl_key=server-key.pem;socket.ssl_cert=server-cert.pem;socket.ssl_ca=ca.pem”
log_error = /var/log/mysql/error.log

[sst]
encrypt=4
ssl-key=server-key.pem
ssl-ca=ca.pem
ssl-cert=server-cert.pem


I start the first node in bootstrap mode, check replication:
mysql> SHOW STATUS LIKE 'wsrep%';
+-----------------------------+-----------------------------------+
| Variable_name               | Value                             |
+-----------------------------+-----------------------------------+
| wsrep_cluster_capabilities  |                                   |
| wsrep_cluster_conf_id       | 18446744073709551615              |
| wsrep_cluster_size          | 0                                 |
| wsrep_cluster_state_uuid    |                                   |
| wsrep_cluster_status        | Disconnected                      |
| wsrep_connected             | OFF                               |
| wsrep_local_bf_aborts       | 0                                 |
| wsrep_local_index           | 18446744073709551615              |
| wsrep_provider_capabilities |                                   |
| wsrep_provider_name         | none                              |
| wsrep_provider_vendor       | Codership Oy <[email protected]> |
| wsrep_provider_version      | 26                                |
| wsrep_ready                 | OFF                               |
| wsrep_thread_count          | 0                                 |
+-----------------------------+-----------------------------------+
14 rows in set (0.00 sec)


Something is wrong, I think, oh well. I run the rest of the nodes, they do not connect, of course. Nothing interesting in the logs:
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.588513Z 1 [Note] [MY-000000] [WSREP] wsrep_init_schema_and_SR (nil)
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.594030Z 1 [System] [MY-000000] [WSREP] PXC upgrade completed successfully
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.673159Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.686006Z 0 [Note] [MY-000000] [WSREP] Initialized wsrep sidno 2
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.686274Z 0 [Note] [MY-000000] [Galera] Loading provider none initial position: 00000000-0000-0000-0000-000000000000:-1
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.686284Z 0 [Note] [MY-000000] [Galera] wsrep_load(): loading provider library 'none'
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.686385Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18-9'  socket: '/var/run/mysqld/mysqld
May 22 15:01:53 db1 mysql-systemd[2017]:  SUCCESS!
May 22 15:01:53 db1 systemd[1]: Started Percona XtraDB Cluster with config /etc/default/mysql.bootstrap.
May 22 15:01:53 db1 mysqld[1972]: 2020-05-22T12:01:53.848072Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port


The lib specified in the config is in its place. All servers are the same version. What could be wrong?

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