During upgrade from focal to jammy, mysql does not restart automatically, but holds up upgrade with an error dialog

Bug #1999293 reported by AlainKnaff
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

1)
root@ubuntu20:~# lsb_release -rd
Description: Ubuntu 20.04.5 LTS
Release: 20.04

2)
root@ubuntu20:~# apt-cache policy mysql-server
mysql-server:
  Installed: 8.0.31-0ubuntu0.20.04.2
  Candidate: 8.0.31-0ubuntu0.22.04.1
  Version table:
     8.0.31-0ubuntu0.22.04.1 500
        500 http://lu.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://lu.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
 *** 8.0.31-0ubuntu0.20.04.2 100
        100 /var/lib/dpkg/status
     8.0.28-0ubuntu4 500
        500 http://lu.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

3) I expect upgrade to 22 to happen as smoothly as possible
4) What happened dialogue (see below) appeared asking to restart mysql manually

When upgrading from focal (20.04.05) to jammy (22.04.01), upgrade stops midway through with the following dialogue:

┌───────────────────────────┤ Configuring libc6:amd64 ├────────────────────────────┐
│ │
│ Failure restarting some services for GNU libc upgrade │
│ │
│ The following services could not be restarted for the GNU libc library upgrade: │
│ │
│ mysql │
│ │
│ You will need to start these manually by running 'invoke-rc.d <service> start'. │
│ │
│ <Ok> │
│ │
└──────────────────────────────────────────────────────────────────────────────────┘

Logging in into another session and attempting to restart mysql while the dialogue is still up fails as well. However, it does succeeds seconds after clicking Ok.

The following shows up in journalctl -u mysql :

Dec 10 08:49:09 ubuntu20 systemd[1]: Starting MySQL Community Server...
Dec 10 08:49:09 ubuntu20 systemd[3544]: mysql.service: Failed to determine user credentials: No such process
Dec 10 08:49:09 ubuntu20 systemd[3544]: mysql.service: Failed at step USER spawning /usr/share/mysql/mysql-systemd-start: No such process
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Control process exited, code=exited, status=217/USER
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 10 08:49:09 ubuntu20 systemd[1]: Failed to start MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Dec 10 08:49:09 ubuntu20 systemd[1]: Stopped MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: Starting MySQL Community Server...
Dec 10 08:49:09 ubuntu20 systemd[3545]: mysql.service: Failed to determine user credentials: No such process
Dec 10 08:49:09 ubuntu20 systemd[3545]: mysql.service: Failed at step USER spawning /usr/share/mysql/mysql-systemd-start: No such process
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Control process exited, code=exited, status=217/USER
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 10 08:49:09 ubuntu20 systemd[1]: Failed to start MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 6.
Dec 10 08:49:09 ubuntu20 systemd[1]: Stopped MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: Starting MySQL Community Server...
Dec 10 08:49:09 ubuntu20 systemd[3546]: mysql.service: Failed to determine user credentials: No such process
Dec 10 08:49:09 ubuntu20 systemd[3546]: mysql.service: Failed at step USER spawning /usr/share/mysql/mysql-systemd-start: No such process
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Control process exited, code=exited, status=217/USER
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 10 08:49:09 ubuntu20 systemd[1]: Failed to start MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 7.
Dec 10 08:49:09 ubuntu20 systemd[1]: Stopped MySQL Community Server.
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Start request repeated too quickly.
Dec 10 08:49:09 ubuntu20 systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 10 08:49:09 ubuntu20 systemd[1]: Failed to start MySQL Community Server.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Lupe Christoph (lupe) wrote :

The problem is that /var/run/mysqld is missing:
16050 openat(AT_FDCWD, "/var/run/mysqld/mysqlx.sock.lock", O_RDWR|O_CREAT|O_EXCL, 0600 <unfinished ...>
16050 write(2, "2022-12-12T15:35:22.524277Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'\n", 196 <unfinished ...>
16050 openat(AT_FDCWD, "/var/run/mysqld/mysqld.sock.lock", O_RDWR|O_CREAT|O_EXCL, 0600 <unfinished ...>
16050 write(2, "2022-12-12T15:35:22.625912Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.\n", 132 <unfinished ...>

After some searching, I found this on GitHub:
https://github.com/systemd/systemd/issues/9814

This command resolved the problem:
systemctl daemon-reexec

No idea what systemd was doing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.