I installed Galera cluster on three Ubuntu 20.04 servers, using these instructions: https://galeracluster.com/2021/03/installing-galera-4-with-mysql-8-on-ubuntu-20-04/
After some initial problems fixed (wsrep_cluster_size remains zero), and changing the wsrep_sst_method to mysqldump I got the | wsrep_cluster_size | 1 | as one might expect.
But when I launch the second node, all goes down.
On both nodes:
mysql -uroot -p -e "show status like 'wsrep_cluster_size'"
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 104
/var/log/mysql/error.log on both nodes like this:
2021-12-03T17:19:55.860595Z 0 [Warning] [MY-013245] [Server] The SSL library function CRYPTO_set_mem_functions failed. This is typically caused by the SSL library already being used. As a result the SSL memory allocation will not be instrumented.
2021-12-03T17:19:55.864234Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-12-03T17:19:56.327615Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-12-03T17:19:56.661524Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2021-12-03T17:19:56.661712Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2021-12-03T17:19:56.662708Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-12-03T17:19:56.662909Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-12-03T17:19:56.693199Z 0 [Warning] [MY-000000] [WSREP] P: Option 'gcs.fc_master_slave' is deprecated and will be removed in the future versions, please use 'gcs.fc_single_primary' instead.
2021-12-03T17:19:56.719119Z 0 [Warning] [MY-000000] [WSREP] P: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory)
2021-12-03T17:19:56.919658Z 0 [Warning] [MY-000000] [WSREP] P: no nodes coming from prim view, prim not possible
/etc/mysql/mysql.conf.d/mysqld.cnf:
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=192.168.1.2
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
# #
# # # Galera Cluster Configuration
wsrep_cluster_name=flog
wsrep_cluster_address=gcomm://192.168.1.2,192.168.1.3,192.168.1.4
# #
# # Galera Synchronization Configuration
wsrep_sst_method=mysqldump
# #
# # Galera Node Configuration
wsrep_node_address=192.168.1.2
## This is the first node
Google reveals, that many people have issues with Ubuntu 20.04 and galera clusrering.
So basically I see two options:
re-install the mysql servers with Centos. I would not prefere that since I am not so familiar with RPM based systems as I have always used debian based linux
Have this working as expected if I get good advice: This will be a production environment, so reliability is of high priority