Mariadb
MariaDB Galera 集群 - 第三個節點無法啟動/連接
我正在嘗試建立一個 MariaDB galera 集群。前 2 個節點執行良好,讓它們啟動並連接。
在第三個節點上,它不會啟動/連接。
# service mysql start Starting mysql (via systemctl): Job for mariadb.service failed because a timeout was exceeded. See "systemctl status mariadb.service" and "journalctl -xe" for details. [FAILED]
日記 -xe 輸出:
Jan 19 09:16:07 host3.domain.com systemd[1]: mariadb.service start operation timed out. Terminating. -- Subject: Unit session-c9591.scope has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- The start-up result is done. -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-c9591.scope has begun starting up. Jan 19 09:17:01 host3.domain.com CROND[1018]: (root) CMD (/usr/local/rtm/bin/rtm 8 > /dev/null 2> /dev/null) Jan 19 09:17:38 host3.domain.com systemd[1]: mariadb.service stop-final-sigterm timed out. Skipping SIGKILL. Entering failed mode. Jan 19 09:17:38 host3.domain.com systemd[1]: Failed to start MariaDB 10.1.30 database server. -- Subject: Unit mariadb.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has failed. -- -- The result is failed. Jan 19 09:17:38 host3.domain.com systemd[1]: Unit mariadb.service entered failed state. Jan 19 09:17:38 host3.domain.com systemd[1]: mariadb.service failed. Jan 19 09:17:38 host3.domain.com polkitd[383]: Unregistered Authentication Agent for unix-process:25848:56441890 (system bus name :1.19233, object path /org/freedesktop/PolicyKit1/Authentic Jan 19 09:17:51 host3.domain.com mysqld[25932]: 2018-01-19 9:17:51 114327532205824 [Note] WSREP: (15573658, 'tcp://0.0.0.0:4567') connection to peer 00000000 with addr timed out, no messa Jan 19 09:18:01 host3.domain.com systemd[1]: Started Session c9592 of user root. -- Subject: Unit session-c9592.scope has finished start-up -- Defined-By: systemd
我不清楚為什麼它會超時,為什麼連接到自身?我應該生成另一個日誌文件來提供更多線索嗎?我在系統日誌中確認了錯誤
[Note] WSREP: (15573658, 'tcp://0.0.0.0:4567') connection to peer 00000000 with addr timed out, no messa
缺少的地址是內部私有 IP。
對我來說,解決方法就是拆除整個集群並重新啟動它。
在每個節點上:
服務 mysql 停止
在最先進的節點上
#galley_new_cluster
在每個後續節點上
服務 mysql 啟動
驗證:
瑪麗亞數據庫$$ (none) $$> 顯示全域狀態,如“%wsrep_cluster_size%”;
+--------------------+-------+ | Variable_name | Value | +--------------------+-------+ | wsrep_cluster_size | 3 | +--------------------+-------+ 1 row in set (0.00 sec)