Hello,
I am new to Percona and MySQL so I ask for some patience. I have recently delved into the realm of building a x3 node XtraDB cluster on Ubuntu 20.04 servers. I am able to get my first node up and running however following the same guides the second and third nodes fail.
I am not sure exactly where to look for logs as I don’t see any error.logs or any relevant data in the journalctl -xe.
Here is what I see when attempting to start the mysql service.
mysql.service - Percona XtraDB Cluster
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-04-26 23:41:37 UTC; 20s ago
Process: 118505 ExecStartPre=/usr/bin/mysql-systemd start-pre (code=exited, status=0/SUCCESS)
Process: 118542 ExecStartPre=/usr/bin/mysql-systemd check-grastate (code=exited, status=0/SUCCESS)
Process: 118571 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 118573 ExecStartPre=/bin/sh -c VAR=bash /usr/bin/mysql-systemd galera-recovery
; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 118672 ExecStart=/usr/sbin/mysqld $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 118724 ExecStopPost=/usr/bin/mysql-systemd stop-post (code=exited, status=0/SUCCESS)
Main PID: 118672 (code=exited, status=1/FAILURE)
Status: "Server startup in progress
Any help or guidance you can provide is much appreciated.
1 Like
Ok I have an update which I hate doing this. I was able to get the second node online however I had to disable the automatic SST encryption. So here is my next question which I think will be more focused which will help out the forum.
When I follow the guide PerconaXtraDBCluster-8.0.27-18.1 it says that SST encryption is automatic however all nodes need to use the same certs, so do I just need to copy the default *.pem files in the default datadir of /var/lib/mysql/ ?
Do I need to modify permissions on those new files at all or just run a chown for the mysql:mysql against them all?
Thanks again!!!
1 Like
Yes, you need to manually copy the *.pem files created by node1 over to node2 and node3. They are not copied as part of the SST process. This is by design. I believe they need to be chown mysql and chmod 640 or 600.
1 Like
I greatly appreciate the confirmation and the added chown info which I did try but did not work which is why I disabled it and was able to confirm that the 2nd and 3rd nodes could then join. One other question for you then. I’ll copy the *.pem files over however i noticed that it wanted some info placed in the my.conf file, is that accurate? Or should all the pem info go into the same mysql.conf file like all my other settings?
1 Like
What you did is a quick workaround since PXC8 uses SSL everywhere by default. It will work, just not be completely secure. Yes, if you copy the pem files to a non-standard location (for example: /etc/ssl/mysql/) then you need to edit my.cnf on all nodes and supply the paths.
1 Like
I verified I don’t need to modify the .cnf files once the *.pem files are copied over and permissions set properly. I stopped the mysql service on all 3 nodes, commented out the pxc-encrypt-cluster-traffic=OFF, bootstrapped the first node again, then started up the other two nodes. All three came up and show x3 nodes.
±-------------------±------+
| Variable_name | Value |
±-------------------±------+
| wsrep_cluster_size | 3 |
±-------------------±------+
1 row in set (0.00 sec)
Looks like I am good and I can close this out as resolved. Thanks Matthewb for your input on this!
1 Like