package mysql-server-8.0 8.0.27-0ubuntu0.20.04.1 failed to install/upgrade: Unable to shut down server, could not get apt cache lock
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Waiting for cache lock: Could not get lock /var/lib/
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.27-
ProcVersionSign
Uname: Linux 5.11.0-27-generic x86_64
ApportVersion: 2.20.11-
AptOrdering:
mysql-
mysql-
mysql-
NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckR
Date: Sun Dec 5 13:57:12 2021
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2021-04-07 (241 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.6
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.27-
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
package mysql-server-8.0 8.0.27-0ubuntu0.20.04.1 failed to - install/upgrade: installed mysql-server-8.0 package post-installation - script subprocess returned error exit status 1 + install/upgrade: Unable to shut down server |
summary: |
package mysql-server-8.0 8.0.27-0ubuntu0.20.04.1 failed to - install/upgrade: Unable to shut down server + install/upgrade: Unable to shut down server, could not get cache lock |
Changed in mysql-8.0 (Ubuntu): | |
status: | New → Triaged |
summary: |
package mysql-server-8.0 8.0.27-0ubuntu0.20.04.1 failed to - install/upgrade: Unable to shut down server, could not get cache lock + install/upgrade: Unable to shut down server, could not get apt cache + lock |
tags: | removed: need-duplicate-check |
Thanks for reporting this bug. Offhand it's not entirely clear what happened, however the error message "Waiting for cache lock: Could not get lock /var/lib/ dpkg/lock- frontend" generally crops up when two apt processes collide, such as a user-requested apt operation while unattended-upgrade is running (or vice versa maybe). From the log files I can't identify if that was the case. The mysql error log shows a couple other errors:
2021-12- 05T08:15: 14.339858Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible' 05T08:15: 14.339935Z 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' 05T08:17: 19.168919Z 4 [System] [MY-013381] [Server] Server upgrade from '80026' to '80027' started. 05T08:25: 19.923278Z 4 [System] [MY-013381] [Server] Server upgrade from '80026' to '80027' completed.
2021-12-
2021-12-
2021-12-
Hopefully you've already resolved this problem, but if not there are many support articles on how to fix the locking situation in general, such as https:/ /askubuntu. com/questions/ 1109982/ e-could- not-get- lock-var- lib-dpkg- lock-frontend- open-11- resource- temporari
Feel free to add clarification if I've missed something. In particular, it would be super helpful to understand how to reproduce this particular broken condition.
I suspect whatever situation led to the locking issue is unrelated to mysql. However, we may want to adjust the mysql apport hook to not trigger bug reports for this type of issue.