package mysql-server-8.0 8.0.33-0ubuntu0.22.04.1 failed to install/upgrade: Can't start server: Bind on TCP/IP port: Address already in use

Bug #2019003 reported by Oytun Emre Özmel
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Triaged
High
Unassigned

Bug Description

done!
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/me
cab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-server-8.0 (8.0.33-0ubuntu0.22.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my
.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 6831
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned
 error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro
r from a previous failure.
                          Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: mysql-server-8.0 8.0.33-0ubuntu0.22.04.1
ProcVersionSignature: Ubuntu 5.19.0-41.42~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-41-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckResult: pass
Date: Tue May 9 16:28:51 2023
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2023-04-26 (12 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.my.cnf: my.cnf links to /etc/mysql/mysql.cnf
MySQLVarLibDirListing: ['server-cert.pem', 'private_key.pem', '#ib_16384_0.dblwr', 'undo_001', 'binlog.index', 'binlog.000001', 'sys', '#innodb_temp', 'ib_buffer_pool', '#innodb_redo', 'client-key.pem', 'ca.pem', 'debian-5.7.flag', 'server-key.pem', 'binlog.000002', '#ib_16384_1.dblwr', 'public_key.pem', 'ibdata1', 'ca-key.pem', 'performance_schema', 'auto.cnf', 'mysql', 'undo_002', 'client-cert.pem', 'mysql.ibd']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.19.0-41-generic root=UUID=f57f0bcf-56fb-4e0f-a965-fb0ff057c0b1 ro intel_iommu=on,igfx_off quiet splash intel_iommu=on,igfx_off vt.handoff=7
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.9
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.33-0ubuntu0.22.04.1 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Oytun Emre Özmel (oytunemre) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-8.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi,

From your error logs I see the following line:

2023-05-09T13:28:49.652463Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Address already in use

Are you either running mysql from a different source and binding the service to the same port or running mariadb?

Since this seems to be a configuration issue, I am marking this bug as incomplete.

If you disagree with my assessment, please, set this bug status back to new and please explain why you believe this is indeed a bug in this package.

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
John Atkinson (vk2yue) wrote :

Yesterday's update fixed this bug. MySQL is working again. If you have this error, just make sure you get the latest update and it will go away. It was NOT a configuration issue. It was most definitely a bug.

Revision history for this message
Bryce Harrington (bryce) wrote :

When upgrading a service, the old service is shut down but it can take a bit of time for the port it communicates on to be freed for the newly upgraded version of the service to bind to. I believe there is a wait() or other code to deal with this, but given we see instances of this error crop up routinely with mysql there must be a race condition or something.

Anyway, John's suggestion to retry installing the latest update is a good workaround.

summary: package mysql-server-8.0 8.0.33-0ubuntu0.22.04.1 failed to
- install/upgrade: installed mysql-server-8.0 package post-installation
- script subprocess returned error exit status 1
+ install/upgrade: Can't start server: Bind on TCP/IP port: Address
+ already in use
Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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