package mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1783182 reported by Emmanuel Iroanya
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Upgrading Ubuntu ran into this

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.22-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 3.13.0-79.123-generic 3.13.11-ckt33
Uname: Linux 3.13.0-79-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Mon Jul 23 14:22:10 2018
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2014-04-18 (1557 days ago)
InstallationMedia:

Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['debian-5.7.flag', 'debian-5.5.flag', 'ib_logfile1', 'timeclock', 'asteridex', 'zipcodes', 'TravMan4', 'ib_logfile0', 'performance_schema', 'ibdata1', 'asteriskcdrdb', 'asterisk', 'mysql_upgrade_info', 'mysql']
ProcCmdline: root=LABEL=DOROOT ro
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.4
 apt 1.2.27
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2018-07-23 (0 days ago)

Revision history for this message
Emmanuel Iroanya (emmanuelthetallc) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

I just tried an Ubuntu release upgrade from Trusty to Xenial with mysql 5.5 installed and configured, and it finished without issues. I even selected that option to not restart services automatically, thinking that would mess up the upgrade, but it still worked.

This is the bit that failed, from your logs:
...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B
Renaming removed key_buffer and myisam-recover options (if present)
start: Job is already running: mysql
invoke-rc.d: initscript mysql, action "start" failed.
invoke-rc.d: release upgrade in progress, error is not fatal
Checking if update is needed.
Checking server version.
Error: Server version (5.5.53-0ubuntu0.14.04.1) does not match with the version of
the server (5.7.22) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
mysql_upgrade failed with exit status 3
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1

It looks like maybe mysql didn't stop, and then the subsequent start failed.

There is also this bit in the mysql logs that looks worrisome, as it's about some damaged tables you have in your DB:
Version: '5.5.53-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/freepbx_settings' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/freepbx_settings'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/notifications' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/notifications'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/module_xml' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/module_xml'
180723 11:46:14 [ERROR] /usr/sbin/mysqld: Table './asterisk/kvstore' is marked as crashed and should be repaired
180723 11:46:14 [Warning] Checking table: './asterisk/kvstore'
180723 11:48:52 [ERROR] /usr/sbin/mysqld: Table './asteriskcdrdb/cdr' is marked as crashed and should be repaired
180723 11:48:52 [Warning] Checking table: './asteriskcdrdb/cdr'
180723 12:10:01 [ERROR] /usr/sbin/mysqld: Table './asterisk/admin' is marked as crashed and should be repaired
180723 12:10:01 [Warning] Checking table: './asterisk/admin'

Bottom line, in orther to further troubleshoot this, we will need a way to reproduce the problem. Some simple steps that would show the upgrade failing like in your case. Until then, I'll mark this bug as incomplete.

As for the system as it stands now, I would try:
sudo apt update
sudo apt -f install <--- inspect that output carefully, see what it wants to do

And *maybe* sudo apt dist-upgrade to let it complete the release upgrade, if it was interrupted.

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-5.7 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Expired
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.