package mysql-server-5.7 5.7.21-1ubuntu1 failed to install/upgrade: new mysql-server-5.7 package pre-installation script subprocess returned error exit status 1

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

Bug Description

The MySQL system is not possible install or error in installation.

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: mysql-server-5.7 5.7.21-1ubuntu1
Uname: Linux 4.4.71-ELAR-Systems armv7l
ApportVersion: 2.20.9-0ubuntu7
Architecture: armhf
Date: Fri Nov 9 06:36:35 2018
ErrorMessage: new mysql-server-5.7 package pre-installation script subprocess returned error exit status 1
KernLog:
 [ 0.004426] Security Framework initialized
 [ 2.109287] SGI XFS with ACLs, security attributes, realtime, no debug enabled
 [ 11.308486] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
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', 'debian-5.7.flag', 'ibtmp1', 'auto.cnf', 'sys', 'phpmyadmin', 'ib_logfile0', 'ib_logfile1', 'performance_schema', 'mysql', 'ib_buffer_pool']
ProcCmdline: earlyprintk console=tty1 root=/dev/mmcblk0p2 rw init=/sbin/init uboot_version=2017.07-g7d17b02-dirty
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2
 apt 1.6.1
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.21-1ubuntu1 failed to install/upgrade: new mysql-server-5.7 package pre-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Francisco Valverde (valleverde) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Fancisco,
I see this in your log
You are required to change your password immediately (root enforced)
chfn: PAM: Authentication token is no longer valid; new one required
adduser: `/usr/bin/chfn -f MySQL Server mysql' returned error code 1. Exiting.
dpkg: error processing archive /tmp/apt-dpkg-install-WA8Pki/5-mysql-server-5.7_5.7.21-1ubuntu1_armhf.deb (--unpack):

Which is nor "normal".
I installed it myself and it has no issue.
I wonder if anyone or anything (scripts/automation) messed with that user 'mysql' and due to that it now fails to install.

That user should not be pre-allocated by other tools, as the package needs it.
Seems like a login or UID expired.

I quickly checked the install scripts, they will call:
        adduser \
          --system \
          --disabled-login \
          --ingroup mysql \
          --no-create-home \
          --home /nonexistent \
          --gecos "MySQL Server" \
          --shell /bin/false

That will call chfn -f to set the full name as it did in your case.

I thought first the only thing that makes sense is an existing userid of the same name conflicting with the package. But it checks if it exists before:
  # creating mysql user if he isn't already there
  if ! getent passwd mysql >/dev/null; then

So what happens in your case?

I see:
chfn: PAM: Authentication token is no longer valid; new one required

Is there anything odd with your pam/login?
Do you have anything that could expire your session externally?
Is this error showing up reproducibly or was this a one off issue due to something odd in PAM?

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.

There isn't really enough information here for a developer to confirm this issue is a bug, or to begin working on it, so I am marking this bug Incomplete for now.

If you can provide exact steps so that a developer can reproduce the original problem, then please add them to this bug and change the 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.