[debian-mysql] Bug#739846: invoke-rc.d: initscript mysql, action "start" failed.

Bob Proulx bob at proulx.com
Sun Feb 23 05:51:02 UTC 2014


Package: mysql-server-5.5
Version: 5.5.35+dfsg-2
Severity: important
Tags: patch

The latest 5.5.35+dfsg-2 fails to upgrade with this result:

Setting up mysql-server-5.5 (5.5.35+dfsg-2) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit
 status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

Diff'ing the newest /etc/init.d/mysql against the previous one shows
this important difference:

@@ -186,4 +186,3 @@
        ;;
 esac
 
-exit 0

The exit 0 at the end of the script was dropped.  This causes the
script to exit with the exit code of the last command run which is
usually non-zero.  In the case that the script exits non-zero then the
upgrade fails to configure the new package.

While in there please fix the funky indention introduced by the last
change too.  The indention is inconsistent.


--- /var/tmp/mysql.dpkg-old     2013-12-29 17:59:05.401201931 -0700
+++ /etc/init.d/mysql   2014-02-22 22:47:12.435555688 -0700
@@ -109,7 +109,8 @@
            /usr/bin/mysqld_safe > /dev/null 2>&1 &
 
            # 6s was reported in #352070 to be too few when using ndbcluster
-           for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
+        # 14s was reported in #736452 to be too few with large installs
+        for i in $(seq 1 30); do
                 sleep 1
                if mysqld_status check_alive nowarn ; then break; fi
                log_progress_msg "."

For anyone else experiencing this problem the workaround is simple.
Append an "exit 0" to the end of the init script and then reconfigure
again.  With  the restoration of the proper exit code the configure
will conclude.

  # echo "exit 0" >> /etc/init.d/mysql
  # dpkg --configure -a
  
Thanks,
Bob


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)



More information about the pkg-mysql-maint mailing list