Dependency failed for Percona Server via mysql.service after upgrade and reboot

After upgrading an Ubuntu 20.04 server via apt-get upgrade Percona mysql server does not start at boot.

Error:

sudo systemctl status mysql.service 
● mysql.service - Percona Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: inactive (dead)

Jun 25 20:21:15 ubuntu-focal systemd[1]: Dependency failed for Percona Server.
Jun 25 20:21:15 ubuntu-focal systemd[1]: mysql.service: Job mysql.service/start failed with result 'dependency'.

However if I run sudo systemctl start mysql.service manually it will start as normal.

Doesn’t appear any error is logged to /var/log/mysql/error.log either.
I’ve also tried uninstalling and reinstalling Percona server.

Any help is greatly appreciated! This is a new one to me and Google’ing hasn’t turned up the fix as usual. However it did show a related post, but didn’t seem to have a resolution: Dependency failed for Percona Server

Thank you for your time.

apt list | grep percona

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libperconaserverclient21-dev/unknown 8.0.33-25-1.focal amd64
libperconaserverclient21-zenfs-dev/unknown 8.0.26-16-1.focal amd64
libperconaserverclient21-zenfs/unknown 8.0.26-16-1.focal amd64
libperconaserverclient21/unknown 8.0.33-25-1.focal amd64
percona-backup-mongodb/unknown 2.1.0-1.focal amd64
percona-mysql-router-zenfs/unknown 8.0.26-16-1.focal amd64
percona-mysql-router/unknown 8.0.33-25-1.focal amd64
percona-mysql-shell/unknown 8.0.33-1-1.focal amd64
percona-release/now 1.0-21.generic all [installed,local]
percona-server-client-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-client/unknown,now 8.0.33-25-1.focal amd64 [installed,automatic]
percona-server-common-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-common/unknown,now 8.0.33-25-1.focal amd64 [installed,automatic]
percona-server-dbg-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-dbg/unknown 8.0.33-25-1.focal amd64
percona-server-rocksdb-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-rocksdb/unknown 8.0.33-25-1.focal amd64
percona-server-server-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-server/unknown,now 8.0.33-25-1.focal amd64 [installed]
percona-server-source-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-source/unknown 8.0.33-25-1.focal amd64
percona-server-test-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-test/unknown 8.0.33-25-1.focal amd64
percona-server-tokudb-zenfs/unknown 8.0.26-16-1.focal amd64
percona-server-tokudb/unknown 8.0.27-18-1.focal amd64
percona-toolkit/unknown 3.5.3-1.focal amd64
percona-xtrabackup-24/unknown 2.4.28-1.focal amd64
percona-xtrabackup-80/unknown 8.0.33-27-1.focal amd64
percona-xtrabackup-dbg-24/unknown 2.4.28-1.focal amd64
percona-xtrabackup-dbg-80/unknown 8.0.33-27-1.focal amd64
percona-xtrabackup-test-24/unknown 2.4.28-1.focal amd64
percona-xtrabackup-test-80/unknown 8.0.33-27-1.focal amd64

Hello and welcome to Percona Community @noaheverett,

Before we could help resolving the question, would you be able to provide us with more information:

  • Upgrade from (8.0.26?) to (8.0.33?)
  • The steps that you used to execute the upgrade (as asked in previous question)?
  • Output of sudo apt list --installed | grep -ie 'mysql\|percona'
  • Nothing is logged in mysql error log but what about kernel logs? dmesg / var-log-message / var-log-syslog?

Thanks,
K

Thank you for the fast response:

  • We upgraded from 8.0.19-10-1.focal

  • Steps to execute the upgrade: sudo apt-get upgrade

  • I don’t see anything in the logs related to mysql/percona

  • Here’s the output of sudo apt list --installed | grep -ie 'mysql\|percona':

libmysqlclient-dev/focal-updates,focal-security,now 8.0.33-0ubuntu0.20.04.2 amd64 [installed]
libmysqlclient21/focal-updates,focal-security,now 8.0.33-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-common/focal,now 5.8+1.0.5ubuntu2 all [installed,automatic]
percona-release/now 1.0-21.generic all [installed,local]
percona-server-client/unknown,now 8.0.33-25-1.focal amd64 [installed,automatic]
percona-server-common/unknown,now 8.0.33-25-1.focal amd64 [installed,automatic]
percona-server-server/unknown,now 8.0.33-25-1.focal amd64 [installed]
  • Here’s the output from dpkg.log from when I did the ugprade:
2023-06-25 15:44:43 upgrade percona-server-server:amd64 8.0.19-10-1.focal 8.0.33-25-1.focal
2023-06-25 15:44:43 status half-configured percona-server-server:amd64 8.0.19-10-1.focal
2023-06-25 15:44:45 status unpacked percona-server-server:amd64 8.0.19-10-1.focal
2023-06-25 15:44:45 status half-installed percona-server-server:amd64 8.0.19-10-1.focal
2023-06-25 15:45:01 status unpacked percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 15:45:01 upgrade percona-server-client:amd64 8.0.19-10-1.focal 8.0.33-25-1.focal
2023-06-25 15:45:01 status half-configured percona-server-client:amd64 8.0.19-10-1.focal
2023-06-25 15:45:01 status unpacked percona-server-client:amd64 8.0.19-10-1.focal
2023-06-25 15:45:01 status half-installed percona-server-client:amd64 8.0.19-10-1.focal
2023-06-25 15:45:03 status unpacked percona-server-client:amd64 8.0.33-25-1.focal
2023-06-25 15:45:03 upgrade percona-server-common:amd64 8.0.19-10-1.focal 8.0.33-25-1.focal
2023-06-25 15:45:03 status half-configured percona-server-common:amd64 8.0.19-10-1.focal
2023-06-25 15:45:03 status unpacked percona-server-common:amd64 8.0.19-10-1.focal
2023-06-25 15:45:03 status half-installed percona-server-common:amd64 8.0.19-10-1.focal
2023-06-25 15:45:03 status unpacked percona-server-common:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 configure percona-server-common:amd64 8.0.33-25-1.focal <none>
2023-06-25 15:48:47 status unpacked percona-server-common:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 status half-configured percona-server-common:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 status installed percona-server-common:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 configure percona-server-client:amd64 8.0.33-25-1.focal <none>
2023-06-25 15:48:47 status unpacked percona-server-client:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 status half-configured percona-server-client:amd64 8.0.33-25-1.focal
2023-06-25 15:48:47 status installed percona-server-client:amd64 8.0.33-25-1.focal
2023-06-25 15:49:37 configure percona-server-server:amd64 8.0.33-25-1.focal <none>
2023-06-25 15:49:37 status unpacked percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 15:49:38 status half-configured percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 15:49:55 status installed percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:01 status installed percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:06 remove percona-server-server:amd64 8.0.33-25-1.focal <none>
2023-06-25 17:21:06 status half-configured percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:07 status half-installed percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:08 status config-files percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:36 install percona-server-server:amd64 8.0.33-25-1.focal 8.0.33-25-1.focal
2023-06-25 17:21:36 status half-installed percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:44 status unpacked percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:45 configure percona-server-server:amd64 8.0.33-25-1.focal <none>
2023-06-25 17:21:45 status unpacked percona-server-server:amd64 8.0.33-25-1.focal
2023-06-25 17:21:45 status half-configured percona-server-server:amd64 8.0.33-25-1.focal

The only step I’ve done after the upgrade in hopes of fixing was to uninstall percona-server and reinstall via sudo apt remove/install ...

Thank you for your help!

Any updates on this issue? I’ve got the same problem after apt update/upgrade on Debian 11, impossible to get the mysql service started with the endless “Dependency failed for Percona Server.” errors

sudo apt list --installed | grep -ie 'mysql\|percona':

mysql-common/oldstable,now 5.8+1.0.7 all [installed,automatic]
percona-release/stable,now 1.0-27.generic all [installed]
percona-server-client/stable,now 8.0.33-25-1.bullseye amd64 [installed,automatic]
percona-server-common/stable,now 8.0.33-25-1.bullseye amd64 [installed,automatic]
percona-server-server/stable,now 8.0.33-25-1.bullseye amd64 [installed]

Edit: Okay, so i got the mysql service up and running and it was the weirdest solutions i’ve ever come across:

sudo journalctl -xe:

Everytime i tried to start mysql i also got an error from remote-fs.target (cifs?) with the same dependency issue, i know why that one failed and that’s because i am on another network that can’t mount the remote target, i removed that /mnt/ entry/filesystem from fstab and after a reboot mysql once again starts without a problem

I doublechecked and added that entry back into fstab, a mountpoint that will fail due to it isn’t accessable on the network and sure enough, mysql refuses to start again.

I don’t get this, why on earth would that affect the startup of mysql? A failed mountpoint in fstab makes mysql refuse to start, why would the mysql startup process care about that?

1 Like

I’ve not yet found a solution, this is a new one to me in the 12’ish years using Percona server. I was hoping for someone smarter than me on this to chime in :smile:

I’m here with similar issues; I’m using Vagrant+Virtualbox running Ubuntu 20.04 for development purposes and I get hit by Percona not starting up because of this issue during boot

Aug 23 10:52:07 vagrant mount[1018]: /sbin/mount.vboxsf: shared folder '/vagrant' was not found (check VM settings / spelling)
Aug 23 10:52:07 vagrant systemd[1]: vagrant.mount: Mount process exited, code=exited, status=1/FAILURE
Aug 23 10:52:07 vagrant systemd[1]: vagrant.mount: Failed with result 'exit-code'.
Aug 23 10:52:07 vagrant kernel: vboxsf: g_fHostFeatures=0x8000000f g_fSfFeatures=0x1 g_uSfLastFunction=29
Aug 23 10:52:07 vagrant kernel: *** VALIDATE vboxsf ***
Aug 23 10:52:07 vagrant kernel: vboxsf: Successfully loaded version 7.0.10 r158379
Aug 23 10:52:07 vagrant kernel: vboxsf: Successfully loaded version 7.0.10 r158379 on 5.4.0-42-generic SMP mod_unload  (LINUX_VERSION_CODE=0x5042c)
Aug 23 10:52:07 vagrant kernel: vboxsf: SHFL_FN_MAP_FOLDER failed for '/vagrant': share not found
Aug 23 10:52:07 vagrant systemd[1]: Failed to mount /vagrant.
Aug 23 10:52:07 vagrant systemd[1]: Dependency failed for Remote File Systems.
Aug 23 10:52:07 vagrant systemd[1]: Dependency failed for Percona Server.
Aug 23 10:52:07 vagrant systemd[1]: mysql.service: Job mysql.service/start failed with result 'dependency'.
Aug 23 10:52:07 vagrant systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.

I don’t understand why Percona depends on remote filesystems to run, but it results in having to implement workarounds, because I need Percona to run at all times while I work with my project.

it is recommended to reinstall thirdparty software once you are updating your OS.
So it would be better to install Percona Software from the repository specified for the OS you are running

I was able to fix the issue by running following commads

  1. Identify Percona Packages: apt list --installed | grep percona - This command lists all installed packages and filters for those related to Percona.
  2. Remove Specific Packages: The following commands remove specific Percona-related packages:
  • apt remove percona-xtrabackup-80
  • apt remove percona-toolkit
  • apt remove percona-server-common
  • apt remove percona-server-client
  • apt remove percona-release
  1. Update Package List: apt-get update - This command updates the list of available packages and their versions.
    4.4. Remove Percona Source Lists*: rm -rf /etc/apt/sources.list.d/percona-* - This command removes all Percona-related source list files.

After cleaning up properly I followed the steps from Use APT repositories - Percona Server for MySQL, and I came across one more error,
The error message N: Download is performed unsandboxed as root as file '/root/percona-release_latest.generic_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

so I had to run

sudo chown -Rv _apt:root /var/cache/apt/archives/partial/ - This command changes the ownership of the directory to the _apt user and root group
and
sudo chmod -Rv 700 /var/cache/apt/archives/partial/ - This command sets the permissions of the directory such that only the owner can read, write, and execute files in the directory.

After this I was able to install Percona-server-server.

Not sure if this was best approach but please do let me know if there is a better way to do it.
Thank You

it was a correct way to update your OS and thirdparty software.

Thanks to Jesper_Andersson.

Yes if you have also this error in journalctl : remote-fs.target: Job remote-fs.target/start failed with result ‘dependency’.
It is perhaps of an other mount error of an unaccessible volume even if it’s not linked to mysql
remove the volume by comment the wrong mount volume in /etc/fstab
do sudo systemctl daemon-reload to update your systemctl
Then run normaly your systemctl start mysql.service

systemctl requires that target to start the service,

# systemctl cat mysqld |grep -i requires
Requires=local-fs.target remote-fs.target

This is why it fails on starting as the remote-fs.target has errors.