1. 程式人生 > >超時導致的Galera節點加入叢集失敗

超時導致的Galera節點加入叢集失敗

需求:為galera叢集新增新的節點。

 

初始化新的節點,加入的時候一直報錯,加入失敗,報錯日誌如下

1 WSREP_SST: [ERROR] Removing /var/lib/mysql//.sst/xtrabackup_galera_info file due to signal (20180420 19:06:51.356)
2 WSREP_SST: [ERROR] Cleanup after exit with status:143 (20180420 19:06:51.360)
3 2018-04-20 19:06:51 139809385338624 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role '
joiner' --address '172.20.3.11' --datadir '/var/lib/mysql/' --parent '149146' --binlog '/var/lib/mysql/mysql-bin' : 4 (Interrupted system call) 4 2018-04-20 19:06:51 139809385338624 [ERROR] WSREP: Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script. 5 2018-04-20 19:06:51 139809916561536 [ERROR] WSREP: SST failed: 4
(Interrupted system call) 6 2018-04-20 19:06:51 139809916561536 [ERROR] Aborting

 

 

最後懷疑是由於資料庫較大,在同步過程中導致資料庫超時報錯,解決方法如下:

vim /usr/lib/systemd/system/mariadb.service

[Service]
TimeoutSec=2h

 

重啟mysql,節點正常加入。