Linux

MariaDB Galera 集群在發出集群命令後掛起

  • September 6, 2013

嘗試使用以下命令將 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/ 。nc -vz mariadbclstr02.local.net 3306我還可以使用 netcat 連接到兩個伺服器nc -vz mariadbclstr01.local.net 3306

根據我的發現,我不得不編輯/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://然後初始化一個新集群並允許其他人加入。

引用自:https://serverfault.com/questions/528791