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

Bug #1657938 reported by dustytrail
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
High
Unassigned

Bug Description

from fresh install

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
Uname: Linux 4.4.42-v7+ armv7l
ApportVersion: 2.20.1-0ubuntu2.4
AptOrdering:
 mysql-client-5.7: Install
 mysql-server-5.7: Install
 mysql-client-5.7: Configure
 mysql-server-5.7: Configure
 NULL: ConfigurePending
Architecture: armhf
Date: Thu Jan 19 17:40:56 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 1
KernLog: [ 1.706254] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
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', 'ib_logfile1', 'ib_logfile101', 'ibdata1']
ProcCmdline: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1360 bcm2708_fb.fbheight=768 bcm2709.boardrev=0xa22082 bcm2709.serial=0x49c51f38 smsc95xx.macaddr=B8:27:EB:C5:1F:38 bcm2708_fb.fbdepth=32 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet splash
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.18
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
dustytrail (fixthebugsnotnewfeatures) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Riccardo (riccardo-cicuto) wrote :

Possible workaround:

In /var/log/apt/history.log

Start-Date: 2017-01-20 10:42:27
Commandline: aptdaemon role='role-commit-packages' sender=':1.126'
Upgrade: mysql-server-5.7:amd64 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1), mysql-server:amd64 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1), mysql-client:amd64 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1), libmysqlclient20:amd64 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1), libmysqlclient20:i386 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1), mysql-server-core-5.7:amd64 (5.7.16-0ubuntu0.16.04.1, 5.7.17-0ubuntu0.16.04.1)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2017-01-20 10:42:27

In /var/log/apt/term.log

Log started: 2017-01-20 10:42:27
Setting up mysql-common (5.7.17-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 mysql-common
Log ended: 2017-01-20 10:42:27

So the problem for me seems to be the missing the /etc/mysql/my.cnf.fallback file.

ll /etc/myql
drwxr-xr-x 4 root root 4096 gen 20 10:59 ./
drwxr-xr-x 189 root root 12288 gen 19 12:44 ../
drwxr-xr-x 2 root root 4096 gen 20 09:43 conf.d/
-rw------- 1 root root 317 nov 19 10:57 debian.cnf
-rwxr-xr-x 1 root root 120 ott 24 17:13 debian-start*
lrwxrwxrwx 1 root root 24 nov 18 21:12 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root 3028 nov 18 21:27 my.cnf.migrated
-rw-r--r-- 1 root root 682 lug 11 2016 mysql.cnf
drwxr-xr-x 2 root root 4096 nov 18 22:24 mysql.conf.d/

So, because the symlink:

my.cnf -> /etc/alternatives/my.cnf

points back to:

/etc/alternatives/my.cnf -> /etc/mysql/mysql.cnf

i assumed (crossing my fingers) that /etc/mysql/mysql.cnf should be eligible as alternative fallback:

sudo cp /etc/mysql/myslq.cnf /etc/mysql/my.cnf.fallback

Run again apt tool to complete the upgrade.

This worked for me.

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

Hi,
in the log I've seen:
2017-01-15T18:31:03.674750Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-15T18:31:28.754081Z 0 [Warning] InnoDB: 1048576 bytes should have been written. Only 12288 bytes written. Retrying for the remaining bytes.
2017-01-15T18:31:28.754329Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
2017-01-15T18:31:28.754417Z 0 [ERROR] InnoDB: Write to file ./ib_logfile1failed at offset 11534336, 1048576 bytes should have been written, only 12288 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2017-01-15T18:31:28.754601Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2017-01-15T18:31:28.755145Z 0 [ERROR] InnoDB: Cannot set log file ./ib_logfile1 to size 48 MB
2017-01-15T18:31:28.755214Z 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2017-01-15T18:31:29.055637Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-01-15T18:31:29.055792Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-01-15T18:31:29.055829Z 0 [ERROR] Failed to initialize plugins.
2017-01-15T18:31:29.055850Z 0 [ERROR] Aborting

That looks like an I/O error either due to failing Hardware or due to out-of-space on the disk backing the Database.

I/O Errors should be in dmesg but I haven't seen any, could you check your system for out-of-space constraints and also let us know if the issue is persistent and reproducible (e.g. when trying to upgrade again).

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

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Hristian (hristian-carabulea) wrote :

I have the same problem. On sudo apt upgrade, I get error, "Setting up mysql-common (5.7.17-0ubuntu0.16.04.1) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)"

I do not even know what to do now.

Should I uninstall all mysql stuff? There are some many dependencies between different mysql packages, I do not even know with which one to start.

And the upgrade process will always give errors, even when I will have new upgrades in the near future. Crap. :(

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Hristian (hristian-carabulea) wrote :

Hello, again. I am not sure how to edit my previous comment.

So, this is a continuation of my previous comment.

After reading the comment from Riccardo (riccardo-cicuto), I copied/corrected his misspelled command line. And afterwards the upgrade worked OK. Thank you, Riccardo (riccardo-cicuto).

sudo cp /etc/mysql/myslq.cnf /etc/mysql/my.cnf.fallback

corrected to
sudo cp /etc/mysql/mysql.cnf /etc/mysql/my.cnf.fallback

Changed in mysql-5.7 (Ubuntu):
importance: Undecided → High
Joshua Powers (powersj)
Changed in mysql-5.7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel Black (daniel-black) wrote :

"InnoDB: Error number 28 means 'No space left on device'" seems pretty conclusive to me. You can't install mysql without disk space. Your Df.txt doesn't show it but it was out of space at the time of install.

Revision history for this message
djeglou ferhat (ferat-dj) wrote : Re: [Bug 1657938] Re: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

you must reinstall the operate system and choice option :replace ubuntu X;X
by the version of new Os

2017-03-28 6:19 GMT+02:00 Daniel Black <email address hidden>:

> "InnoDB: Error number 28 means 'No space left on device'" seems pretty
> conclusive to me. You can't install mysql without disk space. Your
> Df.txt doesn't show it but it was out of space at the time of install.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1674404).
> https://bugs.launchpad.net/bugs/1657938
>
> Title:
> package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to
> install/upgrade: subprocess installed post-installation script
> returned error exit status 1
>
> Status in mysql-5.7 package in Ubuntu:
> Incomplete
>
> Bug description:
> from fresh install
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
> Uname: Linux 4.4.42-v7+ armv7l
> ApportVersion: 2.20.1-0ubuntu2.4
> AptOrdering:
> mysql-client-5.7: Install
> mysql-server-5.7: Install
> mysql-client-5.7: Configure
> mysql-server-5.7: Configure
> NULL: ConfigurePending
> Architecture: armhf
> Date: Thu Jan 19 17:40:56 2017
> ErrorMessage: subprocess installed post-installation script returned
> error exit status 1
> KernLog: [ 1.706254] systemd[1]: systemd 229 running in system mode.
> (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
> 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', 'ib_logfile1',
> 'ib_logfile101', 'ibdata1']
> ProcCmdline: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1360
> bcm2708_fb.fbheight=768 bcm2709.boardrev=0xa22082 bcm2709.serial=0x49c51f38
> smsc95xx.macaddr=B8:27:EB:C5:1F:38 bcm2708_fb.fbdepth=32
> bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000
> vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1
> root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet splash
> RelatedPackageVersions:
> dpkg 1.18.4ubuntu1.1
> apt 1.2.18
> SourcePackage: mysql-5.7
> Title: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to
> install/upgrade: subprocess installed post-installation script returned
> error exit status 1
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/
> 1657938/+subscriptions
>

Revision history for this message
djeglou ferhat (ferat-dj) wrote :

because many of file system configuration was been deleted on purge commande

2017-03-28 11:59 GMT+02:00 Ferhat DJEGLOU <email address hidden>:

> you must reinstall the operate system and choice option :replace ubuntu
> X;X by the version of new Os
>
> 2017-03-28 6:19 GMT+02:00 Daniel Black <email address hidden>:
>
>> "InnoDB: Error number 28 means 'No space left on device'" seems pretty
>> conclusive to me. You can't install mysql without disk space. Your
>> Df.txt doesn't show it but it was out of space at the time of install.
>>
>> --
>> You received this bug notification because you are subscribed to a
>> duplicate bug report (1674404).
>> https://bugs.launchpad.net/bugs/1657938
>>
>> Title:
>> package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to
>> install/upgrade: subprocess installed post-installation script
>> returned error exit status 1
>>
>> Status in mysql-5.7 package in Ubuntu:
>> Incomplete
>>
>> Bug description:
>> from fresh install
>>
>> ProblemType: Package
>> DistroRelease: Ubuntu 16.04
>> Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
>> Uname: Linux 4.4.42-v7+ armv7l
>> ApportVersion: 2.20.1-0ubuntu2.4
>> AptOrdering:
>> mysql-client-5.7: Install
>> mysql-server-5.7: Install
>> mysql-client-5.7: Configure
>> mysql-server-5.7: Configure
>> NULL: ConfigurePending
>> Architecture: armhf
>> Date: Thu Jan 19 17:40:56 2017
>> ErrorMessage: subprocess installed post-installation script returned
>> error exit status 1
>> KernLog: [ 1.706254] systemd[1]: systemd 229 running in system mode.
>> (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
>> +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
>> 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', 'ib_logfile1',
>> 'ib_logfile101', 'ibdata1']
>> ProcCmdline: 8250.nr_uarts=0 dma.dmachans=0x7f35
>> bcm2708_fb.fbwidth=1360 bcm2708_fb.fbheight=768 bcm2709.boardrev=0xa22082
>> bcm2709.serial=0x49c51f38 smsc95xx.macaddr=B8:27:EB:C5:1F:38
>> bcm2708_fb.fbdepth=32 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000
>> vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0
>> console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
>> quiet splash
>> RelatedPackageVersions:
>> dpkg 1.18.4ubuntu1.1
>> apt 1.2.18
>> SourcePackage: mysql-5.7
>> Title: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to
>> install/upgrade: subprocess installed post-installation script returned
>> error exit status 1
>> UpgradeStatus: No upgrade log present (probably fresh install)
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/165
>> 7938/+subscriptions
>>
>
>

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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