搭建galera集群的時候,在虛擬機器測試搭建,電腦關機重啟後,發現宕機後的節點無法加入集群。
檢視/var/log/mariadb/mariadb.log發現報錯如下:
[root@controller1 ~]# tail -300f /var/log/mariadb/mariadb.log
2019-05-28 2:09:41 139686358980800 [error] mysqld: server gssapi error (major 851968, minor 2529639093) : gss_acquire_cred failed -unspecified gss failure. minor code may provide more information. keytab file:/etc/krb5.keytab is nonexistent or empty.
2019-05-28 2:09:41 139686358980800 [error] plugin 『gssapi』 init function returned error.
2019-05-28 2:09:41 139686358980800 [note] server socket created on ip: 『192.168.1.73』.
2019-05-28 2:09:41 139685977000704 [error] mysqld: can』t create/write to file 『/var/run/mariadb/mariadb.pid』 (errcode: 13 「permission denied」)
2019-05-28 2:09:41 139685977000704 [error] can』t start server: can』t create pid file: permission denied
原來是pid檔案許可權不夠。更改檔案許可權
[root@controller1 ~]#chown mysql:mysql /var/run/mariadb/mariadb.pid
啟動mariadb服務
[root@controller1 ~]# systemctl start mariadb
檢視服務狀態恢復正常
[root@controller1 ~]# systemctl status mariadb -l
● mariadb.service - mariadb 10.1 database server
loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
active: active (running) since tue 2019-05-28 02:10:53 cst; 5min ago
process: 27566 execstartpost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/success)
process: 27271 execstartpre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/success)
process: 27248 execstartpre=/usr/libexec/mysql-check-socket (code=exited, status=0/success)
main pid: 27431 (mysqld)
status: 「taking your sql requests now…」
tasks: 34
cgroup: /system.slice/mariadb.service
└─27431 /usr/libexec/mysqld --basedir=/usr
may 28 02:10:51 controller1 rsyncd[27509]: connect from controller3 (192.168.1.143)
may 28 02:10:51 controller1 rsyncd[27508]: rsync to rsync_sst/./glance from controller3 (192.168.1.143)
may 28 02:10:51 controller1 rsyncd[27509]: rsync to rsync_sst/./keystone from controller3 (192.168.1.143)
may 28 02:10:51 controller1 rsyncd[27509]: receiving file list
may 28 02:10:51 controller1 rsyncd[27516]: connect from controller3 (192.168.1.143)
may 28 02:10:51 controller1 rsyncd[27516]: rsync to rsync_sst/ from controller3 (192.168.1.143)
may 28 02:10:51 controller1 rsyncd[27516]: receiving file list
may 28 02:10:52 controller1 rsyncd[27473]: sent 0 bytes received 0 bytes total size 0
may 28 02:10:53 controller1 systemd[1]: started mariadb 10.1 database server.
mariadb galera群集故障記錄
負責galera上執行刪除語句 delete from t1 where group id 2 and group id 3 執行後,群集破壞,除了主節點存活,其他倆個節點全都停掉。檢視galera的限制,沒有主鍵的表,不支援delete操作。但是檢視刪除資料的表是有主鍵的,只不過刪除不是根據主鍵刪...
MySQL cluster集群 NDB集群學習
公司主業務用的mysql集群是官方自帶的mysql cluster,mysql自帶的集群模式,這個集群的模式和mgr pxc 主從 有點不一樣。一 儲存引擎不是innodb,mysql cluster用的是ndb引擎 二 資料儲存方式不同,mysql的其他集群方式資料是存在磁碟上的,中間資料的快取用...
zookeeper集群部署 kafka集群部署
wget wget 解壓到目錄 tar zxvf apache zookeeper 3.5.8 bin.tar.gz c usr local 進入目錄 cd usr local 建立軟連線 ln s usr local apache zookeeper 3.5.8 zookeeper 複製配置檔案 ...