Failed to start mysql on new node

Hi,

Have a great day !

I wanna ask a question, we have 3 node configuration of pxc, and this is the configuration :

Node1 = pxc1 --> Bootstrap
Node2 = pxc2 --> mysql
Node3 = pxc3 --> mysql

When I try to start  mysql in node2, it got failed :

[root@prodlike-ecmdb2 my.cnf.d]# systemctl start mysqlJob for mysql.service failed because the control process exited with error code. See “systemctl status mysql.service” and “journalctl -xe” for details.

And this is the output from ‘systemctl status mysql.service’ :
[root@prodlike-ecmdb2 my.cnf.d]# systemctl status mysql.service● mysql.service - Percona XtraDB Cluster   Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; vendor preset: disabled)   Active: failed (Result: exit-code) since Thu 2020-08-27 11:27:50 WIB; 1min 18s ago  Process: 28111 ExecStopPost=/usr/bin/mysql-systemd stop-post (code=exited, status=0/SUCCESS)  Process: 28080 ExecStop=/usr/bin/mysql-systemd stop (code=exited, status=2)  Process: 27647 ExecStartPost=/usr/bin/mysql-systemd start-post $MAINPID (code=exited, status=1/FAILURE)  Process: 27646 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=1/FAILURE)  Process: 27603 ExecStartPre=/usr/bin/mysql-systemd start-pre (code=exited, status=0/SUCCESS) Main PID: 27646 (code=exited, status=1/FAILURE)
Aug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[27647]: ERROR! mysqld_safe with PID 27646 has already exited: FAILUREAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service: control process exited, code=exited status=1Aug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28080]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readableAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28080]: ERROR! mysql already deadAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service: control process exited, code=exited status=2Aug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28111]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readableAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28111]: WARNING: mysql may be already deadAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: Failed to start Percona XtraDB Cluster.Aug 27 11:27:50 prodlike-ecmdb2 systemd[1]: Unit mysql.service entered failed state.Aug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service failed.
And this is the output from ‘journalctl -xe’ :[root@prodlike-ecmdb2 my.cnf.d]# journalctl -xe---- Unit session-171.scope has begun starting up.Aug 27 11:20:01 prodlike-ecmdb2 CROND[27488]: (root) CMD (/usr/lib64/sa/sa1 1 1)Aug 27 11:27:48 prodlike-ecmdb2 polkitd[738]: Registered Authentication Agent for unix-process:27597:8668104 (system bus name :1.408 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object pAug 27 11:27:48 prodlike-ecmdb2 systemd[1]: Starting Percona XtraDB Cluster…-- Subject: Unit mysql.service has begun start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel---- Unit mysql.service has begun starting up.Aug 27 11:27:49 prodlike-ecmdb2 mysqld_safe[27646]: 2020-08-27T04:27:49.149863Z mysqld_safe Logging to ‘/var/log/mysqld.log’.Aug 27 11:27:49 prodlike-ecmdb2 mysqld_safe[27646]: 2020-08-27T04:27:49.156310Z mysqld_safe Logging to ‘/var/log/mysqld.log’.Aug 27 11:27:49 prodlike-ecmdb2 mysqld_safe[27646]: 2020-08-27T04:27:49.227717Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysqlAug 27 11:27:49 prodlike-ecmdb2 mysqld_safe[27646]: 2020-08-27T04:27:49.270287Z mysqld_safe WSREP: Running position recovery with --log_error=’/var/lib/mysql/wsrep_recovery.PJoUyd’ --pid-fiAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service: main process exited, code=exited, status=1/FAILUREAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[27647]: /usr/bin/mysql-systemd: line 140: kill: (27646) - No such processAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[27647]: ERROR! mysqld_safe with PID 27646 has already exited: FAILUREAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service: control process exited, code=exited status=1Aug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28080]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readableAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28080]: ERROR! mysql already deadAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service: control process exited, code=exited status=2Aug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28111]: WARNING: mysql pid file /var/run/mysqld/mysqld.pid empty or not readableAug 27 11:27:50 prodlike-ecmdb2 mysql-systemd[28111]: WARNING: mysql may be already deadAug 27 11:27:50 prodlike-ecmdb2 systemd[1]: Failed to start Percona XtraDB Cluster.-- Subject: Unit mysql.service has failed-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel---- Unit mysql.service has failed.---- The result is failed.Aug 27 11:27:50 prodlike-ecmdb2 systemd[1]: Unit mysql.service entered failed state.Aug 27 11:27:50 prodlike-ecmdb2 systemd[1]: mysql.service failed.Aug 27 11:27:50 prodlike-ecmdb2 polkitd[738]: Unregistered Authentication Agent for unix-process:27597:8668104 (system bus name :1.408, object path /org/freedesktop/PolicyKit1/AuthenticatioAug 27 11:30:01 prodlike-ecmdb2 systemd[1]: Started Session 172 of user root.-- Subject: Unit session-172.scope has finished start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel---- Unit session-172.scope has finished starting up.---- The start-up result is done.Aug 27 11:30:01 prodlike-ecmdb2 systemd[1]: Starting Session 172 of user root.-- Subject: Unit session-172.scope has begun start-up-- Defined-By: systemd-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel---- Unit session-172.scope has begun starting up.Aug 27 11:30:01 prodlike-ecmdb2 CROND[28175]: (root) CMD (/usr/lib64/sa/sa1 1 1)
I already tried to googling it but still didn’t get the solution,
Can anyone help me to solve this ?
Really appreciate :slight_smile:

Thanks,
Fahrul

1 Like

Hi @ashfahrul
Could you please also tell what OS do you use and what is the version of PXC, so I could check this in the same environment

1 Like
Evgeniy Patlan said: Hi @ashfahrul
Could you please also tell what OS do you use and what is the version of PXC, so I could check this in the same environment
Hi @@"Evgeniy Patlan"
Thanks for your feedback,
Here's the information you asked before :

Red Hat Enterprise Linux Server release 7.5 (Maipo)Server version: 5.7.22-22-57-log Percona XtraDB Cluster (GPL), Release rel22, Revision da86071, WSREP version 29.26, wsrep_29.26
1 Like

Hi @ashfahrul

I tried to reproduce your issue but without success.

Also I would suggest you using one of the newest versions of PXC as 5.7.22-22 is quite old

1 Like