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

Bug #1694705 reported by ahmed
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)

aeltaib@aeltaib-PC:~$ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.18-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.8.0-53.56~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
Date: Wed May 31 14:30:34 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-05-30 (0 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
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: ['ibdata1', 'performance_schema', 'ib_logfile0', 'ib_buffer_pool', 'mysql', 'ib_logfile1', 'debian-5.7.flag', 'sys', 'auto.cnf']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.8.0-53-generic root=UUID=c702a83e-870c-4bbf-8fb6-f39b496b52c9 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.20
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.18-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
ahmed (aeltaib) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
the first one ...

N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

... is an unrelated issue. In fact not so much an issue than a FYI message telling you that since the update this file is no more active, but still around if you want/need to retain anything.

The second one ...
aeltaib@aeltaib-PC:~$ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

... first seems to be bug 1670629, but that is about timing on upgrade.
But you report this connect after the upgrade.

On the upgrade itself the server fails to start, and due to that the upgrade is being considered failed.
From the log:
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 2017-05-31 14:30:33 EET; 7ms ago
  Process: 8758 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
  Process: 8757 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 8750 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 8757 (code=exited, status=1/FAILURE)

May 31 14:30:33 aeltaib-PC systemd[1]: Failed to start MySQL Community Server.
May 31 14:30:33 aeltaib-PC systemd[1]: mysql.service: Unit entered failed state.
May 31 14:30:33 aeltaib-PC systemd[1]: mysql.service: Failed with result 'e...'.

An extended look at a full systemctl status mysql might shed some extra light.

But mostly the last mysql start I think was crashed by (from the log):
2017-05-31T12:30:35.024009Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
2017-05-31T12:30:35.024015Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2017-05-31T12:30:35.024029Z 0 [ERROR] Aborting

So is there anything running?

Questions:
- What are the permissions of /var/run/mysqld/mysqld.sock?
- Would it work if you run through sudo?
- if /var/run/mysqld/mysqld.sock which process owns it (lsof) and is that process running?
- output of "systemctl status mysql.service"
- is there a mysql running already?
- are the mysql configured ports un ise by something else?

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: 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.