0

我已经配置了一个包含三个节点的 MariaDB Galera 集群。主节点和从主节点之一已启动并运行,但第三个节点不会运行。所有三个节点上的系统规格和集群配置都是相同的(除了更改每个节点上的 wsrep_node_address 和 wsrep_node_name)。

这是节点的配置(wsrep_node_address 和 wsrep_node_name 在每个节点上都是唯一的):

[galera]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0

datadir=/var/lib/mysql
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2

wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.1.111,192.168.1.112,192.168.1.113"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.9.113'
wsrep_node_name='george-db4'
wsrep_sst_method=xtrabackup
wsrep_sst_auth=username:password

MariaDb 似乎不喜欢该配置

wsrep_cluster_address="gcomm://192.168.1.111,192.168.1.112,192.168.1.113"

因为当我注释掉它时,MariaDB 重新启动就好了。但是当我取消注释时,它只会显示以下消息:

Starting MySQL................................... ERROR! 
ERROR! Failed to restart server.

When i change the wsrep_cluster_address to just wsrep_cluster_address="gcomm://, MariaDb runs with no problem. So i am not sure while it is having problems with assigning the IP address (even if it works fine on the other two nodes). I have tried empting the galera.cache file, i have tried re-installing the cluster, i have tried rebooting the machine etc and nothing works so far. I even truncated the log file /var/lib/mysql/db1.err with the command truncate logfile --size 0 (now i cannot figure out how to get my log file back with space as i realized i would need the log file).

4

1 回答 1

1

I'm having a similar issue. It's like Galera won't see my garlera.conf file, even though it's included in the my.cnf.

I've found that adding the parameters to the serviced command is the way to get around this:

sudo service mysql start --wsrep_cluster_address="gcomm://192.168.1.111,192.168.1.112,192.168.1.113" --wsrep_cluster_name="galera_cluster"
于 2015-02-12T13:42:27.080 回答