mysqlmariadbgalera

Galera_new_cluster command not starting a cluster


Following documentation on how to set up a MariaDB Galera cluster, I simply created the proper config files and started my primary db server with the galera_new_cluster command (I'm running RHEL7). According to the documentation, at that point you should be able to run:

SHOW STATUS LIKE 'wsrep_cluster_size';

And see

+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 1     | 
+--------------------+-------+

However, I see wsrep_cluster_size of zero with these other relevant values:

MariaDB [(none)]>  show global status like 'wsrep%';
+--------------------------+----------------------+
| Variable_name            | Value                |
+--------------------------+----------------------+
| 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_name      |                      |
| wsrep_provider_vendor    |                      |
| wsrep_provider_version   |                      |
| wsrep_ready              | OFF                  |
| wsrep_thread_count       | 0                    |
+--------------------------+----------------------+

My settings in /etc/my.cnf.d/server.cnf are:

bind_address=172.28.7.15
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name="galera_cluster"
wsrep_cluster_address="gcomm://172.28.7.15,172.28.7.18,172.28.7.19"
wsrep_node_address=172.28.7.15
wsrep_node_name='node01'
wsrep_slave_threads=1
wsrep_certify_nonPK=1
wsrep_max_ws_rows=131072
wsrep_max_ws_size=1073741824
wsrep_debug=1
wsrep_convert_LOCK_to_trx=0
wsrep_retry_autocommit=1
wsrep_auto_increment_control=1
wsrep_drupal_282555_workaround=0
wsrep_causal_reads=0
wsrep_notify_cmd=
wsrep_sst_method=rsync

And I've confirmed that the variables are loaded using SHOW VARIABLES.

I feel like I'm following the documentation exactly and it's just not showing what I expect. The only warnings in logs are warnings about SSL not being set up - is that required?


Solution

  • You mentioned you didn't see any WSREP logs in /var/log/mariadb/mariadb.log. Perhaps wsrep_on option is set to OFF. Try setting it to ON.

    Lots of documentation assumes MariaDB Galera 10.0. But in 10.1 and higher, wsrep_on defaults to OFF.

    Default Value: OFF (>= MariaDB 10.1), ON (<= MariaDB Galera Cluster 10.0) https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_on