• Bug#265869: mysql-server: postinst dies when it can't stop mysql server

    From Jure Cuhalev@1:229/2 to All on Sun Aug 15 15:10:07 2004
    From: [email protected]

    Package: mysql-server
    Version: 4.0.20-11
    Severity: grave
    Tags: sid

    *** Please type your report below this line ***

    When trying to install mysql-server on a system that doesn't have mysql-server yet installed
    it dies in postinst script while trying to stop a mysql service that isn't installed yet.

    Unpacking mysql-server (from .../mysql-server_4.0.20-11_i386.deb) ... invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
    Trying to stop the MySQL server resulted in exitcode 100.
    Stop it yourself and try again!
    dpkg: error processing /var/cache/apt/archives/mysql-server_4.0.20-11_i386.deb (--unpack):
    subprocess pre-installation script returned error exit status 1
    Errors were encountered while processing:
    /var/cache/apt/archives/mysql-server_4.0.20-11_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    regards

    Jure Cuhalev
    [email protected]


    -- System Information:
    Debian Release: 3.1
    APT prefers unstable
    APT policy: (500, 'unstable'), (1, 'experimental')
    Architecture: i386 (i686)
    Kernel: Linux 2.6.6-1-386
    Locale: LANG=C, LC_CTYPE=C


    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Christian Hammers@1:229/2 to All on Sun Aug 15 19:00:09 2004
    From: [email protected]

    severity 265869 normal
    tags 265869 + unreproducible
    tags 265869 + moreinfo
    thanks

    Hello Jure

    On 2004-08-15 Jure Cuhalev wrote:
    When trying to install mysql-server on a system that doesn't have mysql-server yet installed it dies in postinst script while trying to
    stop a mysql service that isn't installed yet.

    Unpacking mysql-server (from .../mysql-server_4.0.20-11_i386.deb) ... invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.
    Trying to stop the MySQL server resulted in exitcode 100.
    Stop it yourself and try again!
    dpkg: error processing /var/cache/apt/archives/mysql-server_4.0.20-11_i386.deb(--unpack):
    subprocess pre-installation script returned error exit status 1
    Errors were encountered while processing:
    /var/cache/apt/archives/mysql-server_4.0.20-11_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Thanks for your report. Sadly I cannot reproduce it after reinstalling it
    on my system a dozend times in different states (therefore I downgrade it to 'normal').

    But I'm very interested in finding the cause of this upgrade problem.

    MySQL is only tried to be stopped if the following condition is true before
    any of the files in the package are unpacked i.e. when there should be no
    mysql files on your system at all if you really had no mysql installed before.

    if [ -n "`$MYADMIN ping 2>/dev/null`" -o
    "`ps cax | grep -c ' mysqld$'`" != 0 ]; then

    That means either "mysqladmin" reported a running server or you have had something with the name "mysqld" in your processlist. And that does only count the program name and not some string like "apt-get install *mysqld*" or so.

    Can it be that there was some locally installed mysql server running?

    Is the problem reproducible when you remove and reinstall mysql? If you try that, please do a "export DEBIAN_SCRIPT_DEBUG=1" prior so that you get debugging output during the execution of the script.


    bye,

    -christian-

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (GNU/Linux)

    iEYEARECAAYFAkEfkggACgkQkR9K5oahGObfcgCfT9qjK2ee35txPKULw+vENy2S zxQAniwCf5gj4UJB6F6+9Qo5M8xefkp4
    =ptLD
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Jure Cuhalev@1:229/2 to Christian Hammers on Sun Aug 15 23:10:08 2004
    From: [email protected]

    On Sunday 15 of August 2004 18:40, Christian Hammers wrote:
    MySQL is only tried to be stopped if the following condition is true before any of the files in the package are unpacked i.e. when there should be no mysql files on your system at all if you really had no mysql installed before.

    if [ -n "`$MYADMIN ping 2>/dev/null`" -o
    "`ps cax | grep -c ' mysqld$'`" != 0 ]; then

    That means either "mysqladmin" reported a running server or you have had something with the name "mysqld" in your processlist. And that does only count the program name and not some string like "apt-get install *mysqld*"
    or so.

    Can it be that there was some locally installed mysql server running?

    Is the problem reproducible when you remove and reinstall mysql? If you try that, please do a "export DEBIAN_SCRIPT_DEBUG=1" prior so that you get debugging output during the execution of the script.


    bye,

    -christian-

    I located the problem. I was installing mysql-server inside debootstraped chroot. It seems that after I install mysql-server for the first time it
    starts mysqld and the daemon keeps running even after I close my chroot session.

    So when I installed mysql-server into second chroot it detected first mysqld via mounted /proc and reacted by trying to stop it and failed at that because it was different chroot.

    Sorry for confusion. You can close this bug.

    --
    Lep pozdrav / Kind regards

    Jure Cuhalev
    [email protected]


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)