Software center does not ask dbconfig question for mysql administrator password preventing cacti from installing properly

Bug #1005952 reported by Sentrist Starleaf
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cacti (Ubuntu)
Fix Released
Undecided
Unassigned
software-center (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I don't really know what happens. When configuring cacti for my database management (MySQL) and webserver (Apache), two dialog boxes show up and give options to abort, retry, and ignore. I choose abort on all of them, then the error dialog box shows up. I'm running Ubuntu 12.04.

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: cacti 0.8.7i-2ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic-pae 3.2.16
Uname: Linux 3.2.0-24-generic-pae i686
ApportVersion: 2.0.1-0ubuntu7
AptOrdering:
 php5-ldap: Install
 cacti: Configure
 php5-ldap: Configure
Architecture: i386
Date: Tue May 29 22:45:32 2012
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
PackageArchitecture: all
SourcePackage: cacti
Title: package cacti 0.8.7i-2ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sentrist Starleaf (starleaf1) wrote :
description: updated
tags: removed: need-duplicate-check
description: updated
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Thanks for reporting your issues with Cacti.

From the DpkgTerminalLog.txt:
"""
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
"""
Did you supply a password for the administrator of mysql when asked for it? Did you get the question to supply the mysql administrator password? Can you confirm that mysql is running and that you are able to log in as root?

To really get all the questions in case some where not asked correctly you could try:
$ dpkg-reconfigure cacti

Please let us know of the progress.

Changed in cacti (Ubuntu):
status: New → Incomplete
Revision history for this message
Sentrist Starleaf (starleaf1) wrote :

So I purged cacti, and then tried to install again with apt-get instead of Software Center. The config program asked for my MySQL password, what web server app I am currently using, and other things. All works correctly now.

Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 1005952] Re: package cacti 0.8.7i-2ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

> So I purged cacti, and then tried to install again with apt-get instead
> of Software Center. The config program asked for my MySQL password, what
> web server app I am currently using, and other things. All works
> correctly now.

Are you saying that Software Center did NOT ask those questions? That
sounds like a serious bug.

Revision history for this message
Sentrist Starleaf (starleaf1) wrote : Re: package cacti 0.8.7i-2ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Software Center did ask what webserver I am using. But the next dialog about configuring cacti with database only had a combo box with Abort/Retry/Ignore for me to choose from.

apt-get on the other hand, asked my webserver, the MySQL password, and one other password I don't know what for.

Revision history for this message
Paul Gevers (paul-climbing) wrote :

I have also assigned this bug to software-center. I am currently not in the position to test myself, but will do so when I have the time to start up on my test system.

summary: - package cacti 0.8.7i-2ubuntu1 failed to install/upgrade: subprocess
- installed post-installation script returned error exit status 1
+ Software center does not ask dbconfig question for mysql administrator
+ password preventing cacti from installing properly
Changed in cacti (Ubuntu):
status: Incomplete → New
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Sentrist, thanks for your report, and thank you Paul for the additional info about the installation problem when using Ubuntu Software Center. I'll set the status of the Software Center task to incomplete pending the result of Paul's test to reproduce.

Thank you very much for your help!
Gary

Changed in software-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Paul Gevers (paul-climbing) wrote :

I finally got around to test this myself. Unfortunately I can not reproduce the described behaviour by Sentrist. I purged cacti and dbconfig-common several times and most of the times things worked all right.

However, I think I saw one time where the DB questions were NOT asked, but in that case I did not get the error message either. I am not 100% sure if I just didn't wait long enough. And I was to eager to retry, to really save the state things were in.

Might this issue be related to the order in which the packages are unpacked? If dbconfig-common is not installed yet, I first get the question about which httpd to configure and only much later the question about the database. While if dbconfig-common is already installed, the order is the other way around and the questions come right after each other. Maybe there are conditions or timeouts where dbconfig-common is just not ready enough to configure cacti?

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cacti (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul Gevers (paul-climbing) wrote :

This shouldn't have taken so long. But anyways. I am closing the cacti part of this bug because the issue is not there anymore in cacti since dbconfig-common (the package that actually asks the questions) doesn't need to ask the password anymore since 2.0.1:

dbconfig-common (2.0.1) unstable; urgency=medium

  * Use debian-sys-maint as default admin for MySQL when on localhost and
    try to retrieve password from /etc/mysql/debian.cnf (Closes: #556174)
  * Convert of `` to $() (Closes: #810846)
  * Tests now include posh and lksh as /bin/sh (not yash as that doesn't
    respect local variables)
  * Fix internal/pgsql for leaving cruft behind
  * Add dh-exec to requirements for autopkg-testing to fix current
    failures
  * Fix typo in warning message (original report in #812156)
  * Update Basque translation (Closes: #809486) (Thanks Dooteo)

 -- Paul Gevers <email address hidden> Tue, 26 Jan 2016 21:08:24 +0100

Changed in cacti (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Paul Gevers (paul-climbing) wrote :

And I am closing the software center part of the bug because dbconfig-common now at least recognizes non-interactive mode spelled differently (I assume this is the real cause for this bug, duplicate of bug #1406700):

dbconfig-common (1.8.50) experimental; urgency=medium

  * Prevent running upgrades twice on error (Closes: #708339)
  * Revert (undocumented) purge logic change in 1.8.48.
  * Fix and unify error handling (Closes: #581646, #497035, #723885)
  * Move reset internal/reconfiguring from postinst to dbc_postinst_cleanup
  * Replace all debconf priorities with a variable (Closes: #607171)
  * Raise priorities when retrying after error
  * Check for existance of dbc_logfile before writing (Closes: #705335)
  * Remove some unneeded code
  * Drop database during reinstall (Closes: #665742)
  * Check if database exists before dropping
  * Fix for #573524 was incomplete, also forget passwords in debconf during
    reconfigure (they can be filled during dbc_preseed_package_debconf)
  * Only ask for dbadmin password if needed for updates (Closes: 599896)
  * Fix typo in dbc_migrate: password-confirm -> app-password-confirm
  * Fix prerm to ask admin_pass if needed during maintainer code
    (Closes: #705222)
  * Unify the error handling; also (Closes: #723885)
  * Make check for DEBIAN_FRONTEND case insensitive (LP: #1406700)
  * Don't use dbc_dballow as variable name in dbconfig-generate-include
    (Closes: #533777)
  * Fix regression in one of the previous uploads which broke preseeding
    by packages using dbconfig-common
  * Allow the admin to specify the domain for the GRANT calls (MySQL)
    (Closes: #673840, #506511)
  * Allow backup from password questions (Closes: #703365)
  * Insert the name of the dbadmin into the debconf templates to avoid
    confusion
  * Improvements to the test script
  * Update d/copyright to machine-readable format
  * Update TODO
  * Update Debconf templates, including review from debian-l10n. No
    call for review on purpose yet.

 -- Paul Gevers <email address hidden> Mon, 30 Mar 2015 20:46:21 +0200

Changed in software-center (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.