Galera 集群同步但缺少变量 wsrep_cluster_size

Galera 集群同步但缺少变量 wsrep_cluster_size

我有一个正在运行且同步的 Galera 集群,但它丢失了wsrep_cluster_size,请参阅下面的命令屏幕截图。

MariaDB [(none)]> show variables like 'wsrep_cluster_size';
Empty set (0.01 sec)

更多细节:

第一台服务器上的配置:

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]

[galera]
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://192.168.56.70,192.168.56.71'
wsrep_cluster_name='setsv-db'
wsrep_node_address='192.168.56.70'
wsrep_node_name='setsv'
wsrep_sst_method=xtrabackup
#wsrep_sst_method=rsync
wsrep_sst_auth=sst_user:sst_user_password
wsrep_provider_options="socket.ssl=true; socket.ssl_key=/etc/pki/galera/server-key.pem; socket.ssl_cert=/etc/pki/galera/server-cert.pem; socket.ssl_ca=/etc/pki/galera/ca-cert.pem"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

第二台服务器上的配置:

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]

[galera]
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address='gcomm://192.168.56.70,192.168.56.71'
wsrep_cluster_name='setsv-db'
wsrep_node_address='192.168.56.71'
wsrep_node_name='setsv-dr'
wsrep_sst_method=xtrabackup
#wsrep_sst_method=rsync
wsrep_sst_auth=sst_user:sst_user_password
wsrep_provider_options="socket.ssl=true; socket.ssl_key=/etc/pki/galera/server-key.pem; socket.ssl_cert=/etc/pki/galera/server-cert.pem; socket.ssl_ca=/etc/pki/galera/ca-cert.pem"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

答案1

现在不用担心。我之前调用了错误的 SQL 命令,应该是GLOBAL STATUS

SHOW GLOBAL STATUS LIKE 'wsrep_%';

相关内容