超时导致的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,节点正常加入。

posted @ 2018-12-14 13:47  cptao  阅读(1992)  评论(1编辑  收藏  举报