Galera Cluster: 3 Node Cluster, One Node does not reconnect after rebooting

27 views Asked by At

I am currently trying to create a cluster of 2 VMs with Ubuntu and an arbitrator node. The cluster is running in such a way that Node 1 and 2 synchronize the databases. When I restart Node 2, it immediately rejoins the cluster, and the same applies to the arbitrator. However, when Node 1 (the node with the cluster creation command "galera_new_cluster") reboots, the cluster needs to be "recreated" each time using the same command.

Is there a possibility or does anyone know of a way to configure Node 1 so that it can rejoin the cluster?

Node1 Settings:

[galera]
# Mandatory settings
wsrep_on                 = ON
wsrep_provider           = /usr/lib/galera/libgalera_smm.so
wsrep_cluster_name       = "MariaDB Galera Cluster"
wsrep_cluster_address    = "gcomm://IP Node1, IP Node2, IP Arbitrator"
wsrep_sst_method         = rsync
binlog_format            = row
default_storage_engine   = InnoDB
innodb_autoinc_lock_mode = 2
innodb_force_primary_key = 1
innodb_doublewrite       = 1

# Allow server to accept connections on all interfaces.
bind-address = 0.0.0.0

# Optional settings
wsrep_slave_threads            = 4
innodb_flush_log_at_trx_commit = 0
wsrep_node_name                = MyNode1
wsrep_node_address             = "IP Node1"

# Logfile
log_error = /var/log/mysql/error.log

Node2 Settings:


[galera]
# Mandatory settings
wsrep_on                 = ON
wsrep_provider           = /usr/lib/galera/libgalera_smm.so
wsrep_cluster_name       = "MariaDB Galera Cluster"
wsrep_cluster_address    = "gcomm://IP Node1, IP Node2, IP Arbitrator"
wsrep_sst_method         = rsync
binlog_format            = row
default_storage_engine   = InnoDB
innodb_autoinc_lock_mode = 2
innodb_force_primary_key = 1
innodb_doublewrite       = 1

# Allow server to accept connections on all interfaces.
bind-address = 0.0.0.0

# Optional settings
wsrep_slave_threads            = 4
innodb_flush_log_at_trx_commit = 0
wsrep_node_name                = MyNode2
wsrep_node_address             = IP Node2

# Logfile
log_error = /var/log/mysql/error.log

Since my knowledge of MariaDB and Linux is rather rudimentary, I have attempted to find a solution through internet research. The problem primarily lies in the fact that it fails only on the first node, and I cannot narrow down the issue further. The suspicion that arises to me after reviewing the search results is that Node 1 acts as kind of a master and therefore cannot reconnect.

I tried to add:

'bootstrap'
    # Bootstrap the cluster, start the first node
    # that initiate the cluster
    echo $echo_n "Bootstrapping the cluster"
    $0 start $other_args --wsrep-new-cluster
    ;;

into /usr/bin/galera_new_cluster without any positive result. I still had to manually create the cluster "new" with the command galera_new_cluster and received this error message:

Failed to restart start.service: Unit start.service not found.
/usr/bin/galera_new_cluster: 31: bootstrap: not found
Bootstrapping the cluster

0

There are 0 answers