Hi,
I am following the installation documentation for the Unbuntu platform but am not able to bootstrap the first node in my cluster.
When running /etc/init.d/mysql bootstrap-pxc I get a message saying:
The server quit without creating a pif file.
I am running Ubuntu 20 in VMWare and am at a bit of a loss here, I’m following the install steps directly from the Percona docs??
Any pointers would be great!?
Thx
1 Like
Hello @mikejhathaway , Why are you using sysV init scripts? Those died about 5-7 years ago. Where did you see this? At least since Ubuntu 14 systemd has been in control. systemctl start mysql@bootstrap
is what you want.
Additionally, for us to help, you need to give us details from the logs. /var/log/mysqld.log
is typical. You might want to look in here yourself and see if you can gather any possible issue first.
1 Like
Hi @matthewb,
Thanks for replying!
I am following the Percona docs, basically mysql@bootstrap returns the following!
systemctl start mysql@bootstrap.service
Failed to start mysql@bootstrap.service: Unit mysql@bootstrap.service not found.
1 Like
Can you provide the URL for the docs that still mentions sysV scripts?
Please note what I said above. I did not say “mysql@bootstrap.service”
1 Like
Here is the link to the docs:
Instead of changing the configuration, start the first node and use either of the following commands:
[root@pxc1 ~]# /etc/init.d/mysql bootstrap-pxc
or
[root@pxc1 ~]# systemctl start mysql@bootstrap.service
Also, I did try your suggestion, the results are the same:
# systemctl start mysql@bootstrap
Failed to start mysql@bootstrap.service: Unit mysql@bootstrap.service not found.
Nothing is being logged @ /var/log/mysqld.log other than when I shut down mysql earlier today
1 Like
Thanks for that link. I’ll get with our docs team.
How did you install PXC? The fact that the unit file does not exist tells me you did not install the packages correctly, or, if you installed via .tar binary, you did not complete all the steps to install the system scripts. I deliver a 2-day intensive PXC training here at Percona. I install PXC all the time via packages, albeit on CentOS, not Ubuntu, and it works fine.
1 Like
Hi @matthewb,
I am following all of the Percona docs, the install is coming from a repo, not a tar based install:
1 Like
Can you see if it is systemctl start mysqld@bootstrap
? I’ve seen that difference before: mysql vs mysqld
1 Like
Doesnt seem so:
# systemctl start mysqld@bootstrap
Failed to start mysqld@bootstrap.service: Unit mysqld@bootstrap.service not found
1 Like
If I run systemctl to list all services, mysqld is not listed!
1 Like
Hi @mikejhathaway
I tried to reproduce the issue but without success.
vagrant@ubuntu-bionic:~$ sudo /etc/init.d/mysql bootstrap-pxc
* Bootstrapping Percona XtraDB Cluster database server mysqld [ OK ]
vagrant@ubuntu-bionic:~$
What could be the issue. When you install PXC on ubuntu it automatically starts mysqld service.
So you should firstly stop mysqld process and after that you should bootstrap node
1 Like
Hi Evgeniy_Patlan,
Many Thanks for the reply. I am able to stop the MySQL Service
Next I proceed to bootstrap the first node I get the errors?!
# systemctl start mysql@bootstrap.service
Failed to start mysql@bootstrap.service: Unit mysql@bootstrap.service not found.
1 Like
@mikejhathaway
Try to use initd script
sudo /etc/init.d/mysql bootstrap-pxc
For 5.7 we didn’t update init.d to systemd unitfiles.
1 Like
Thanks, this is where I started, using init.d is the other example in the documentation of starting the bootstrap sequence, this fails with:
# sudo /etc/init.d/mysql bootstrap-pxc
* Bootstrapping Percona XtraDB Cluster database server mysqld
* The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
1 Like
@mikejhathaway
Could you please show the mysqld.log and my.cnf file?
1 Like
Hi,
The my.cnf is off of the shelf:
#
# The Percona XtraDB Cluster 5.7 configuration file.
#
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
# Please make any edits and changes to the appropriate sectional files
# included below.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/percona-xtradb-cluster.conf.d/
I cannot attach the log file as I am a new user. The only error that stands out is:
2021-02-08T17:58:32.087342Z 0 [Warning] WSREP: Fail to access the file (/var/lib/mysql//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
2021-02-08T17:58:32.087351Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
I also see
2021-02-08T17:58:32.435093Z 0 [ERROR] unknown option '--Authentication for SST method'
2021-02-08T17:58:32.435114Z 0 [ERROR] Aborting
Here is the contents of wsrep.cnf:
[mysqld]
# Path to Galera library
wsrep_provider=/usr/lib/galera3/libgalera_smm.so
# Cluster connection URL contains IPs of nodes
#If no IP is found, this implies that a new cluster needs to be created,
#in order to do that you need to bootstrap this node
wsrep_cluster_address=gcomm://191.168.195.138
# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
# MyISAM storage engine has only experimental support
default_storage_engine=InnoDB
# Slave thread to use
wsrep_slave_threads= 8
wsrep_log_conflicts
# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
innodb_autoinc_lock_mode=2
# Node IP address
#wsrep_node_address=192.168.70.63
# Cluster name
wsrep_cluster_name=pxc-cluster
#If wsrep_node_name is not specified, then system hostname will be used
wsrep_node_name=pxc-cluster-node-1
wsrep_node_address=192.168.195.138
#pxc_strict_mode allowed values: DISABLED,PERMISSIVE,ENFORCING,MASTER
pxc_strict_mode=ENFORCING
# SST method
wsrep_sst_method=xtrabackup-v2
Authentication for SST method
wsrep_sst_auth=sstuser:caPassw0rd
1 Like
@mikejhathaway Thanks for your reply.
As I can see from the provided information you have uncommented comment line and mysqld tries to parse the option but it is just comment and there is no such option.
So please comment line Authentication for SST method
in wsrep.cnf (the last but one line)
1 Like
Hi @Evgeniy_Patlan,
Argh!!! D’ou!!! What a moron, I hadn’t spotted that!! As usual, the issue is between the keyboard and the chair!
# sudo /etc/init.d/mysql bootstrap-pxc
* Bootstrapping Percona XtraDB Cluster database server mysqld [ OK ]
Thanks for pointing out my mistake!
1 Like
@mikejhathaway I am glad I was able to help.
If any questions appear - you know we are glad to help
1 Like