package mysql-server-8.0 8.0.19-0ubuntu0.19.10.3 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1

Bug #1864958 reported by Andy Wylde
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Incomplete
Undecided
Lars Tangvald

Bug Description

Setting up mysql-server-8.0 (8.0.19-0ubuntu0.19.10.3) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2020-02-27T06:03:40.533679Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-02-26 23:03:56 MST; 13ms ago
  Process: 39335 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
  Process: 39356 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
 Main PID: 39356 (code=exited, status=1/FAILURE)
   Status: "Data Dictionary upgrade from MySQL 5.7 in progress"
invoke-rc.d: release upgrade in progress, error is not fatal
Setting up mysql-server (8.0.19-0ubuntu0.19.10.3) ...

Upgrade complete

The upgrade has completed but there were errors during the upgrade
process.

ProblemType: Package
DistroRelease: Ubuntu 19.10
Package: mysql-server-8.0 8.0.19-0ubuntu0.19.10.3
ProcVersionSignature: Ubuntu 5.0.0-38.41-generic 5.0.21
Uname: Linux 5.0.0-38-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.4
Architecture: amd64
Date: Wed Feb 26 22:57:41 2020
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
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.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['debian-5.7.flag', 'auto.cnf', 'chillercity.tar.gz', 'server-cert.pem', 'chiller', 'mysql', 'ib_buffer_pool', 'client-cert.pem', 'mysql_upgrade_info', 'ca-key.pem', 'Quickbooks', 'Chiller', 'performance_schema', 'binlog.index', 'ca.pem', 'IP_Phones', 'private_key.pem', 'ib_logfile0', 'server-key.pem', 'public_key.pem', 'voce_test', 'chillercity', '#innodb_temp', 'sys', 'Chiller.tar.gz', 'client-key.pem', 'ibdata1', 'ib_logfile1', 'Interwrx_Support', 'voip_billing']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.0.0-38-generic root=UUID=6670a550-b39f-11e8-9502-00155d0aa50e ro maybe-ubiquity
Python3Details: /usr/bin/python3.7, Python 3.7.5, python3-minimal, 3.7.5-1
PythonDetails: /usr/bin/python2.7, Python 2.7.17, python-minimal, 2.7.17-1
RelatedPackageVersions:
 dpkg 1.19.7ubuntu2
 apt 1.9.4
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.19-0ubuntu0.19.10.3 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to eoan on 2020-02-27 (0 days ago)
modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2020-02-26T22:57:10.341115

Revision history for this message
Andy Wylde (andywylde) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andy Wylde (andywylde) wrote :
Download full text (5.4 KiB)

I tried the usual to fix this bug .....

 apt --fix-broken install
 apt install mysql-server

and while it did fix a broken dependency it still reported status as Upgrade in Progress 5.7 to 8.0 ...

However in inspecting the SQL error log it seems that the upgrade was stuck on on infinite loop trying
(and failing) to upgrade the same table over and over ......

2020-02-27T06:33:22.196147Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) starting as process 7625
2020-02-27T06:33:22.220027Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2020-02-27T06:33:25.927054Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_group is not found in InnoDB dictionary
2020-02-27T06:33:25.927427Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_group
2020-02-27T06:33:25.935839Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_contact is not found in InnoDB dictionary
2020-02-27T06:33:25.936212Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_contact
2020-02-27T06:33:25.942545Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/Company is not found in InnoDB dictionary
2020-02-27T06:33:25.942987Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.Company
2020-02-27T06:33:33.946118Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2020-02-27T06:33:33.946879Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-27T06:33:35.557598Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu0.19.10.3) (Ubuntu).
2020-02-27T06:33:36.706904Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-02-27T06:33:36.711302Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) starting as process 7698
2020-02-27T06:33:36.734882Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2020-02-27T06:33:39.938288Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_group is not found in InnoDB dictionary
2020-02-27T06:33:39.938929Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_group
2020-02-27T06:33:39.948222Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_contact is not found in InnoDB dictionary
2020-02-27T06:33:39.948637Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_contact
2020-02-27T06:33:39.955979Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/Company is not found in InnoDB dictionary
2020-02-27T06:33:39.956409Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.Company
2020-02-27T06:33:48.102907Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2020-02-27T06:33:48.103689Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-27T06:33:49.688120Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu0.19.10.3) (Ubuntu).
2020-02-27T06:33:50.699200Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.

and so on ad-infinitum ........

Read more...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The initial upgrade was at 2020-02-27T05:57:24.644898Z

And that already has thrown the same issues:
2020-02-27T05:57:11.390065Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-02-27T05:57:11.397089Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu0.19.10.3) starting as process 17204
2020-02-27T05:57:11.463144Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2020-02-27T05:57:15.889595Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_group is not found in InnoDB dictionary
2020-02-27T05:57:15.889989Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_group
2020-02-27T05:57:15.899648Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/root_contact is not found in InnoDB dictionary
2020-02-27T05:57:15.900108Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.root_contact
2020-02-27T05:57:15.908185Z 2 [ERROR] [MY-012083] [InnoDB] Table IP_Phones/Company is not found in InnoDB dictionary
2020-02-27T05:57:15.908587Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for IP_Phones.Company
2020-02-27T05:57:24.583660Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2020-02-27T05:57:24.584837Z 0 [ERROR] [MY-010119] [Server] Aborting

That is the same error that repeats later on.

Changed in mysql-8.0 (Ubuntu):
assignee: nobody → Lars Tangvald (lars-tangvald)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

That seems to be a mysql specific upgrade issue, I'm subscribing and assigning Lars for subject-matter expertise e.g. if it is a known and common issue.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

I can only remember seeing this once before, which was someone who had accidentally gone from 5.7 to 8.0, then back again to 5.7.

Could you try running the mysqlcheck utility?
Syntax would be something like «sudo mysqlcheck IP_PHONES» I think.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Er, mysqlcheck only works if the server is running, so probably not very helpful.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Before upgrading, could you ensure mysql_upgrade has been run on the 5.7 database (this should be automatic in ubuntu packaging unless you've copied older 5.7 files into a newer 5.7 installation)?

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

One more thing to try (pre-upgrade) is to download mysql-shell from https://dev.mysql.com/downloads/shell/ and run the upgrade checker utility, which has tests for common upgrade issues (https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-upgrade.html)

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
Andreas Hasenack (ahasenack) wrote :

Setting the bug status to "incomplete" pending feedback from Lars' suggestions and requests.

Changed in mysql-8.0 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Another possible cause would be files being manually deleted from the datadir (so metadata tables believe they should still be there). Are the tables mentioned in the error log present and in use for the 5.7 packages?

Revision history for this message
tinodj (gjorgjioski) wrote :

On my side, in conf, I had sql_mode containing NO_AUTO_CREATE_USER. After removing all was fine.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for the feedback Tinodj.
I've marked two other similar cases as a dup now.

But now that it is confirmed we also happen to know that this is a variant of bug 1612517.
I'll mark it as dup and add info there about this new category.

To post a comment you must log in.