mysql server fails to start in postinst on package upgrade

Bug #354585 reported by robersonfox
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.1 (Ubuntu)
Expired
Low
Unassigned

Bug Description

In a AMD64

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 9.04
ErrorMessage: sub-processo post-installation script retornou estado de saída de erro 1
NonfreeKernelModules: nvidia ath_hal
Package: mysql-server-5.1 5.1.31-1ubuntu2
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de saída de erro 1
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
robersonfox (robersonfox) wrote :
Revision history for this message
Andreas Olsson (andol) wrote :

Are there any /var/log/daemon.log entries from that time regarding mysql? Have you had a version of mysql-server installed before? Perhaps mysql-server-5.0?

Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
robersonfox (robersonfox) wrote : Re: [Bug 354585] Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

yes, I had the directories of an old installation.

2009/4/26 Andreas Olsson <email address hidden>

> Are there any /var/log/daemon.log entries from that time regarding
> mysql? Have you had a version of mysql-server installed before? Perhaps
> mysql-server-5.0?
>
> ** Changed in: mysql-dfsg-5.1 (Ubuntu)
> Status: New => Incomplete
>
> --
> package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de sa?da de erro 1
> https://bugs.launchpad.net/bugs/354585
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mysql-dfsg-5.1” source package in Ubuntu: Incomplete
>
> Bug description:
> In a AMD64
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 9.04
> ErrorMessage: sub-processo post-installation script retornou estado de
> saída de erro 1
> NonfreeKernelModules: nvidia ath_hal
> Package: mysql-server-5.1 5.1.31-1ubuntu2
> SourcePackage: mysql-dfsg-5.1
> Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de saída de erro 1
> Uname: Linux 2.6.28-11-generic x86_64
>

--
Carl Roberson
Genova Engine C&S
www.genovaengine.com
Av. Avelino Pinheiro - 596 - Jaçanã - Ibirité
31 3521.0069

Revision history for this message
Andreas Olsson (andol) wrote : Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

Ok, taken a bit of a closer look at the logs now. Just figured out how to translate the error messages :)

Can you post the result of the follow two commands

ls -ld /var/lib/mysql/
ls -ld /

(Actually it is primarily the first one I believe is irrelevant. But once we're at it, I did see something else in the logs which didn't seem right.)

Revision history for this message
robersonfox (robersonfox) wrote : Re: [Bug 354585] Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

No, i removed the instalation.

2009/4/27 Andreas Olsson <email address hidden>

> Ok, taken a bit of a closer look at the logs now. Just figured out how
> to translate the error messages :)
>
> Can you post the result of the follow two commands
>
> ls -ld /var/lib/mysql/
> ls -ld /
>
> (Actually it is primarily the first one I believe is irrelevant. But
> once we're at it, I did see something else in the logs which didn't seem
> right.)
>
> --
> package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de sa?da de erro 1
> https://bugs.launchpad.net/bugs/354585
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mysql-dfsg-5.1” source package in Ubuntu: Incomplete
>
> Bug description:
> In a AMD64
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 9.04
> ErrorMessage: sub-processo post-installation script retornou estado de
> saída de erro 1
> NonfreeKernelModules: nvidia ath_hal
> Package: mysql-server-5.1 5.1.31-1ubuntu2
> SourcePackage: mysql-dfsg-5.1
> Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de saída de erro 1
> Uname: Linux 2.6.28-11-generic x86_64
>

--
Carl Roberson
Genova Engine C&S
www.genovaengine.com
Av. Avelino Pinheiro - 596 - Jaçanã - Ibirité
31 3521.0069

Revision history for this message
Andreas Olsson (andol) wrote : Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

Well, based on the logs I'd say it seems like the error was caused by /var/lib/mysql/ being owned by a non-mysql user. But without any remains of the folder I'm not sure if there is anything we can do to figure out the root cause of these permission problems.

Revision history for this message
robersonfox (robersonfox) wrote : Re: [Bug 354585] Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

Yes, /var/lib/mysql was owned by root, not mysql user,
before i removed the instalation i see it.

May be the instalation process do a: chown -R mysql mysql /var/lib/mysql

2009/4/27 Andreas Olsson <email address hidden>

> Well, based on the logs I'd say it seems like the error was caused by
> /var/lib/mysql/ being owned by a non-mysql user. But without any remains
> of the folder I'm not sure if there is anything we can do to figure out
> the root cause of these permission problems.
>
> --
> package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de sa?da de erro 1
> https://bugs.launchpad.net/bugs/354585
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mysql-dfsg-5.1” source package in Ubuntu: Incomplete
>
> Bug description:
> In a AMD64
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 9.04
> ErrorMessage: sub-processo post-installation script retornou estado de
> saída de erro 1
> NonfreeKernelModules: nvidia ath_hal
> Package: mysql-server-5.1 5.1.31-1ubuntu2
> SourcePackage: mysql-dfsg-5.1
> Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de saída de erro 1
> Uname: Linux 2.6.28-11-generic x86_64
>

--
Carl Roberson
Genova Engine C&S
www.genovaengine.com
Av. Avelino Pinheiro - 596 - Jaçanã - Ibirité
31 3521.0069

Revision history for this message
robersonfox (robersonfox) wrote :

Yes, /var/lib/mysql was owned by root, not mysql user,
before I removed the instalation i see it.

Maybe the instalation process do a: chown -R mysql mysql /var/lib/mysql

2009/4/27 Andreas Olsson <email address hidden>

> Well, based on the logs I'd say it seems like the error was caused by
> /var/lib/mysql/ being owned by a non-mysql user. But without any remains
> of the folder I'm not sure if there is anything we can do to figure out
> the root cause of these permission problems.
>
> --
> package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de sa?da de erro 1
> https://bugs.launchpad.net/bugs/354585
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mysql-dfsg-5.1” source package in Ubuntu: Incomplete
>
> Bug description:
> In a AMD64
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 9.04
> ErrorMessage: sub-processo post-installation script retornou estado de
> saída de erro 1
> NonfreeKernelModules: nvidia ath_hal
> Package: mysql-server-5.1 5.1.31-1ubuntu2
> SourcePackage: mysql-dfsg-5.1
> Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de saída de erro 1
> Uname: Linux 2.6.28-11-generic x86_64
>

--
Carl Roberson
Genova Engine C&S
www.genovaengine.com
Av. Avelino Pinheiro - 596 - Jaçanã - Ibirité
31 3521.0069

Revision history for this message
Andreas Olsson (andol) wrote : Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

@Carl: Just to make sure if there is an actual bug here or not; is the root ownership of /var/lib/mysql the result of something you did, or do you believe the package manager somehow created that situation?

Revision history for this message
robersonfox (robersonfox) wrote : Re: [Bug 354585] Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

No, the root was the owner of /var/lib/mysql, kept the files after a
reinstall of ubuntu, this directory (/var/lib/ mysql) saved on my Pendrive
(backup), then moved them to this directory (again) after the reinstall,
then tried to install mysql and got this error.

2009/4/30 Andreas Olsson <email address hidden>

> @Carl: Just to make sure if there is an actual bug here or not; is the
> root ownership of /var/lib/mysql the result of something you did, or do
> you believe the package manager somehow created that situation?
>
> --
> package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de sa?da de erro 1
> https://bugs.launchpad.net/bugs/354585
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mysql-dfsg-5.1” source package in Ubuntu: Incomplete
>
> Bug description:
> In a AMD64
>
> ProblemType: Package
> Architecture: amd64
> DistroRelease: Ubuntu 9.04
> ErrorMessage: sub-processo post-installation script retornou estado de
> saída de erro 1
> NonfreeKernelModules: nvidia ath_hal
> Package: mysql-server-5.1 5.1.31-1ubuntu2
> SourcePackage: mysql-dfsg-5.1
> Title: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade:
> sub-processo post-installation script retornou estado de saída de erro 1
> Uname: Linux 2.6.28-11-generic x86_64
>

--
Carl Roberson
Genova Engine C&S
www.genovaengine.com
Av. Avelino Pinheiro - 596 - Jaçanã - Ibirité
31 3521.0069

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.1 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Jeremy Wilkins (wjeremy) wrote : Re: package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-processo post-installation script retornou estado de sa?da de erro 1

I am having the same error, but my installation went poorly. Currently on Karmic with version 5.1.31.

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

My error, I posted too quickly. My problem was that a program was trying to access the mysql database during install.

Revision history for this message
robersonfox (robersonfox) wrote :

I solved the problem by giving permission to read and write in the /var/lib/ mysql to mysql user
(chown-R mysql.mysql /var/lib/mysql),
I suggested that this be implemented in the package, unfortunately no.

Chuck Short (zulcss)
Changed in mysql-dfsg-5.1 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
mayroncachina (mayroncachina) wrote :

Even taking a cue from Carl, I could not install the package.

Revision history for this message
Mathias Gug (mathiaz) wrote :

I guess that Carl's problem comes from the fact that when the /var/lib/mysql/ directory was restored from the backup media ownership was not restored correctly.

Changed in mysql-dfsg-5.1 (Ubuntu):
importance: Medium → Low
status: Confirmed → Triaged
summary: - package mysql-server-5.1 5.1.31-1ubuntu2 failed to install/upgrade: sub-
- processo post-installation script retornou estado de sa?da de erro 1
+ mysql server fails to start if existing /var/lib/mysql is not owned by
+ mysql user
Revision history for this message
Mathias Gug (mathiaz) wrote : Re: mysql server fails to start if existing /var/lib/mysql is not owned by mysql user

The maintainer scripts should have fixed the ownership of the /var/lib/mysql/.

According to the apt terminal log the error is:

Configurando mysql-server-5.1 (5.1.31-1ubuntu2) ...

 * Stopping MySQL database server mysqld [ OK ]

 * Starting MySQL database server mysqld [fail]

Do you still have the content of /var/log/daemon.log at the time of the upgrade to help figure out why mysqld failed to start?

Changed in mysql-dfsg-5.1 (Ubuntu):
status: Triaged → Incomplete
summary: - mysql server fails to start if existing /var/lib/mysql is not owned by
- mysql user
+ mysql server fails to start in postinst on package upgrade
Revision history for this message
Chuck Short (zulcss) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-dfsg-5.1 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-dfsg-5.1 (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.