package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: el subproceso instalado el script post-installation devolvió el código de salida de error 1

Bug #1658316 reported by Joaquín Ignacio Aramendía
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Happened while upgrading mysql-server to version 5.7.17-0ubuntu0.16.04.1 over 5.7.16-0ubuntu0.16.04.1. The issue seems to be on the upgrade script, my mysql server instance is not running and apparently it expects to be running as per this message:

[...]
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
[...]

This is the full output for the configuration part of the mysql-server upgrade (it's in spanish, sorry):

[...]
Desempaquetando mysql-server (5.7.17-0ubuntu0.16.04.1) sobre (5.7.16-0ubuntu0.16.04.1) ...
Procesando disparadores para man-db (2.7.5-1) ...
Procesando disparadores para systemd (229-4ubuntu16) ...
Procesando disparadores para ureadahead (0.100.0-19) ...
Procesando disparadores para libc-bin (2.23-0ubuntu5) ...
Configurando libpam-systemd:amd64 (229-4ubuntu16) ...
Configurando udev (229-4ubuntu16) ...
addgroup: El grupo `input' ya existe como grupo del sistema. Saliendo.
update-initramfs: deferring update (trigger activated)
Configurando uuid-runtime (2.27.1-6ubuntu3.2) ...
Configurando mysql-client-core-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Configurando mysql-client-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Configurando mysql-server-core-5.7 (5.7.17-0ubuntu0.16.04.1) ...
Configurando mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error al procesar el paquete mysql-server-5.7 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
[...]

Then I tried to
$ sudo apt install -f
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
2 no instalados del todo o eliminados.
Se utilizarán 0 B de espacio de disco adicional después de esta operación.
Configurando mysql-server-5.7 (5.7.17-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error al procesar el paquete mysql-server-5.7 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de mysql-server:
 mysql-server depende de mysql-server-5.7; sin embargo:
 El paquete `mysql-server-5.7' no está configurado todavía.

dpkg: error al procesar el paquete mysql-server (--configure):
 problemas de dependencias - se deja sin configurar
No se escribió un informe «apport» porque el mensaje de error indica que es un mensaje de error asociado a un fallo previo.
                                           Se encontraron errores al procesar:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Same error appears. Then I tried to start mysql-server whit:
$ sudo systemctl restart mysql.service

And try again upgrade:
$ sudo apt install -f
Same error

The file /var/run/mysqld/mysqld.sock exists after restarting the server and I'm able to connect to the database from mysql client.

Ubuntu release:
$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

Package:
$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
joaquin@smeagol:~$ apt-cache policy mysql-server
mysql-server mysql-server-5.7 mysql-server-core-5.7
joaquin@smeagol:~$ apt-cache policy mysql-server-5.7
mysql-server-5.7:
  Instalados: 5.7.17-0ubuntu0.16.04.1
  Candidato: 5.7.17-0ubuntu0.16.04.1
  Tabla de versión:
 *** 5.7.17-0ubuntu0.16.04.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.7.11-0ubuntu6 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Hope it helps and thanks in advance.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.8.0-34.36~16.04.1-generic 4.8.11
Uname: Linux 4.8.0-34-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Sat Jan 21 09:58:14 2017
ErrorMessage: el subproceso instalado el script post-installation devolvió el código de salida de error 1
InstallationDate: Installed on 2016-11-20 (61 days ago)
InstallationMedia: Ubuntu-MATE 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
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: ['meteo', 'mysql_upgrade_info', 'debian-5.7.flag', 'biblio', 'ib_buffer_pool', 'indicadores_dlc', 'performance_schema', 'ib_logfile1', 'auto.cnf', 'ibdata1', 'INDICADORES_DLC_caratulacion.csv', 'sys', 'ib_logfile0', 'expedientes.csv', 'prueba', 'mysql']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.8.0-34-generic root=UUID=2d660348-6a87-4ed8-8f87-96823f4b88e1 ro quiet splash vt.handoff=7
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: el subproceso instalado el script post-installation devolvió el código de salida de error 1
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: [modified]
mtime.conffile..etc.mysql.mysql.conf.d.mysqld.cnf: 2016-11-21T14:38:38.707453
upstart.mysql.override: manual

Revision history for this message
Joaquín Ignacio Aramendía (samsagax) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

You'r assumption is correct - there were a few more of those reports, so Dup'ing onto just one

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.