发出集群命令后 MariaDB Galera Cluster 挂起

发出集群命令后 MariaDB Galera Cluster 挂起

尝试使用以下命令在 RHEL 6 上将两个 MariaDB Galera 服务器集群在一起时:

mysqld -uroot --wsrep_cluster_address=gcomm://

然后屏幕就停在那里,向我输出以下输出:

130805 10:26:50 InnoDB: The InnoDB memory heap is disabled
130805 10:26:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130805 10:26:50 InnoDB: Compressed tables use zlib 1.2.3
130805 10:26:50 InnoDB: Using Linux native AIO
130805 10:26:50 InnoDB: Initializing buffer pool, size = 128.0M
130805 10:26:50 InnoDB: Completed initialization of buffer pool
130805 10:26:50 InnoDB: highest supported file format is Barracuda.
130805 10:26:50  InnoDB: Waiting for the background threads to start
130805 10:26:51 Percona XtraDB (http://www.percona.com) 1.1.8-29.3 started; log sequence number 5715012
130805 10:26:51 [Note] Plugin 'FEEDBACK' is disabled.
130805 10:26:51 [Note] Event Scheduler: Loaded 0 events
130805 10:26:51 [Note] WSREP: Read nil XID from storage engines, skipping position init
130805 10:26:51 [Note] WSREP: wsrep_load(): loading provider library 'none'
130805 10:26:51 [Note] mysqld: ready for connections.
Version: '5.5.29-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server, wsrep_23.7.3.rXXXX

据我所知,它似乎正在工作。然后我发出命令来连接到这个集群主服务器:

$ mysqld -uroot --wsrep_cluster_address=gcom://mariadbclstr02.local.net

130805 11:27:21 InnoDB: The InnoDB memory heap is disabled
130805 11:27:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130805 11:27:21 InnoDB: Compressed tables use zlib 1.2.3
130805 11:27:21 InnoDB: Using Linux native AIO
130805 11:27:21 InnoDB: Initializing buffer pool, size = 128.0M
130805 11:27:21 InnoDB: Completed initialization of buffer pool
130805 11:27:21 InnoDB: highest supported file format is Barracuda.
130805 11:27:21  InnoDB: Waiting for the background threads to start
130805 11:27:22 Percona XtraDB (http://www.percona.com) 1.1.8-29.3 started; log sequence number 1598129
130805 11:27:22 [Note] Plugin 'FEEDBACK' is disabled.
130805 11:27:22 [Note] Event Scheduler: Loaded 0 events
130805 11:27:22 [Note] WSREP: Read nil XID from storage engines, skipping position init
130805 11:27:22 [Note] WSREP: wsrep_load(): loading provider library 'none'
130805 11:27:22 [Note] mysqld: ready for connections.
Version: '5.5.29-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server, wsrep_23.7.3.rXXXX

现在它们都只是坐在那里,据我所知什么都没有发生。有没有办法看看他们是否做得正确?我正在关注 MariaDB 网站上的文档:https://kb.askmonty.org/en/getting-started-with-mariadb-galera-cluster/。我还可以使用 netcat 连接到两个服务器,nc -vz mariadbclstr02.local.net 3306并且nc -vz mariadbclstr01.local.net 3306

答案1

据我发现,我不必像以前那样发出命令,而是必须编辑/etc/my.cnf并添加这些行。相反,我创建了一个/etc/my.cnf.d/zabbix_cluster.cnf文件,并将指定的行放在https://kb.askmonty.org/en/getting-started-with-mariadb-galera-cluster/。然后我就可以正常启动 MySQL 了。然后编辑/etc/my.cnf/zabbix_cluster.cnf配置文件后,我必须通过发出以下命令来启动集群/etc/init.d/mysql start --wsrep_cluster_address=gcomm://,然后初始化一个新集群并允许其他人加入。

相关内容