Ambiente:
SO: CentOS 7
Versão do Cluster Percona XtraDB: 5.6
Número de nós do cluster: 3
Esse problema está no nó de bootstrap. (percona1.production.local)
Problema: o cluster do Percona XtraDB estava funcionando corretamente. Para testar o HA, reiniciei o nó mestre. Depois de reiniciar estou enfrentando problemas com o MySQL start.
Registro de erros: journalctl -xe
$sudo systemctl start mysql
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
[root@percona1 lib]# journalctl -xe
May 22 01:01:50 percona1 mysqld[4488]:
May 22 01:01:50 percona1 mysqld_safe[4105]: 170522 01:01:50 mysqld_safe mysqld from pid file /var/run/mysqld/mysql.pid ended
May 22 01:01:50 percona1 mysqld_safe[4492]: mysqld from pid file /var/run/mysqld/mysql.pid ended
May 22 01:01:51 percona1 mysql-systemd[4106]: /usr/bin/mysql-systemd: line 132: kill: (4105) - No such process
May 22 01:01:51 percona1 mysql-systemd[4106]: ERROR! mysqld_safe with PID 4105 has already exited: FAILURE
May 22 01:01:51 percona1 systemd[1]: mysql.service: control process exited, code=exited status=1
May 22 01:01:51 percona1 mysql-systemd[4494]: WARNING: mysql pid file /var/run/mysqld/mysql.pid empty or not readable
May 22 01:01:51 percona1 mysql-systemd[4494]: ERROR! mysql already dead
May 22 01:01:51 percona1 systemd[1]: mysql.service: control process exited, code=exited status=2
May 22 01:01:51 percona1 mysql-systemd[4523]: WARNING: mysql pid file /var/run/mysqld/mysql.pid empty or not readable
May 22 01:01:51 percona1 mysql-systemd[4523]: WARNING: mysql may be already dead
May 22 01:01:51 percona1 systemd[1]: Failed to start Percona XtraDB Cluster.
Verificou algumas referências onde é recomendável verificar /var/lib/mysql
de permissões.
[user@percona1 mysql]$ sudo ls -lh /var/lib/mysql/
[sudo] password for user:
total 6.9G
-rw-rw---- 1 mysql mysql 56 May 15 01:42 auto.cnf
drwx------ 2 mysql mysql 12K May 16 05:27 bamboo
drwx------ 2 mysql mysql 12K May 16 05:17 confluence
-rw------- 1 mysql mysql 129M May 22 00:47 galera.cache
-rw-rw---- 1 mysql mysql 121 May 16 05:19 GRA_5_11291.log
-rw-rw---- 1 mysql mysql 116 May 17 06:57 grastate.dat
-rw-rw---- 1 mysql mysql 76M May 17 06:57 ibdata1
-rw-rw---- 1 mysql mysql 128M May 17 06:57 ib_logfile0
-rw-rw---- 1 mysql mysql 128M May 16 05:27 ib_logfile1
drwx------ 2 mysql mysql 36K May 16 02:08 jiradb
drwx------ 2 mysql mysql 4.0K May 15 01:42 mysql
-rw-rw---- 1 mysql mysql 3.3K May 15 01:48 mysql-bin.000001
-rw-rw---- 1 mysql mysql 1.1G May 16 02:34 mysql-bin.000002
-rw-rw---- 1 mysql mysql 1.1G May 16 03:06 mysql-bin.000003
-rw-rw---- 1 mysql mysql 1009M May 16 03:28 mysql-bin.000004
-rw-rw---- 1 mysql mysql 478M May 16 04:45 mysql-bin.000005
-rw-rw---- 1 mysql mysql 1016M May 16 05:03 mysql-bin.000006
-rw-rw---- 1 mysql mysql 143 May 16 05:11 mysql-bin.000007
-rw-rw---- 1 mysql mysql 1.1G May 16 05:23 mysql-bin.000008
-rw-rw---- 1 mysql mysql 976M May 16 06:54 mysql-bin.000009
-rw-rw---- 1 mysql mysql 143 May 17 06:57 mysql-bin.000010
-rw-rw---- 1 mysql mysql 190 May 17 06:56 mysql-bin.index
-rw-rw---- 1 mysql mysql 64K May 15 01:42 percona1-bin.000001
-rw-rw---- 1 mysql mysql 1022K May 15 01:42 percona1-bin.000002
-rw-rw---- 1 mysql mysql 44 May 15 01:42 percona1-bin.index
drwx------ 2 mysql mysql 4.0K May 15 01:42 performance_schema
-rw-r--r-- 1 root root 117 May 15 01:42 RPM_UPGRADE_HISTORY
-rw-r--r-- 1 mysql mysql 117 May 15 01:42 RPM_UPGRADE_MARKER-LAST
-rw-rw---- 1 mysql mysql 42 May 16 04:54 xtrabackup_galera_info
Meu /etc/my.cnf:
[user@percona1 mysql]$ cat /etc/my.cnf
# Template my.cnf for PXC
# Edit to your requirements.
[mysqld]
log_bin
binlog_format = ROW
innodb_buffer_pool_size = 100M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 128M
innodb_file_per_table = 1
datadir = /var/lib/mysql
wsrep_cluster_address = gcomm://percona2.production.local,percona3.production.local
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so
wsrep_slave_threads = 8
wsrep_cluster_name = Atlassian-MYSQL-Cluster
wsrep_node_name = percona1
wsrep_node_address = percona1.production.local
wsrep_sst_method = xtrabackup-v2
wsrep_sst_auth = sstuser:User@SST
innodb_autoinc_lock_mode = 2
max_allowed_packet = 64M
service-startup-timeout = 9000
[mysqld_safe]
pid-file = /var/run/mysqld/mysql.pid
syslog
!includedir /etc/my.cnf.d
Qualquer um enfrentou um problema semelhante. Você poderia por favor me ajudar a resolver este problema? Por favor, deixe-me saber se estou perdendo alguma coisa.