[Bug 1173085] Re: bacula-director-mysql tried to run dbconfig-common before mysql-server has finished installing

Simon Green 1173085 at bugs.launchpad.net
Tue Apr 30 12:16:40 UTC 2013


Here is the console log. I've stripped out the updating and downloading
sections:


$ sudo apt-get update && sudo apt-get install bacula-director-mysql
[..............]
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-23-generic linux-headers-3.2.0-23 linux-headers-3.2.0-24 linux-headers-3.2.0-37 linux-headers-3.2.0-37-generic linux-headers-3.2.0-24-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  bacula-common bacula-common-mysql bacula-director-common dbconfig-common gawk heirloom-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl
  libsigsegv2 mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  bacula-doc libipc-sharedcache-perl libterm-readkey-perl tinyca mailx
The following NEW packages will be installed
  bacula-common bacula-common-mysql bacula-director-common bacula-director-mysql dbconfig-common gawk heirloom-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl
  libplrpc-perl libsigsegv2 mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 21 newly installed, 0 to remove and 73 not upgraded.
Need to get 29.5 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
[..............]
Fetched 29.5 MB in 1s (26.2 MB/s)
Preconfiguring packages ...
Selecting previously unselected package bacula-common.
(Reading database ... 158725 files and directories currently installed.)
Unpacking bacula-common (from .../bacula-common_5.2.5-0ubuntu6.2_amd64.deb) ...
Adding user 'bacula'... Ok.
Selecting previously unselected package mysql-common.
Unpacking mysql-common (from .../mysql-common_5.5.31-0ubuntu0.12.04.1_all.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.31-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package bacula-common-mysql.
Unpacking bacula-common-mysql (from .../bacula-common-mysql_5.2.5-0ubuntu6.2_amd64.deb) ...
Selecting previously unselected package libsigsegv2.
Unpacking libsigsegv2 (from .../libsigsegv2_2.9-4ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up libsigsegv2 (2.9-4ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Selecting previously unselected package gawk.
(Reading database ... 158906 files and directories currently installed.)
Unpacking gawk (from .../gawk_1%3a3.1.8+dfsg-0.1ubuntu1_amd64.deb) ...
Selecting previously unselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.5-1build1_amd64.deb) ...
Processing triggers for man-db ...
Setting up bacula-common (5.2.5-0ubuntu6.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Selecting previously unselected package bacula-director-common.
(Reading database ... 159004 files and directories currently installed.)
Unpacking bacula-director-common (from .../bacula-director-common_5.2.5-0ubuntu6.2_amd64.deb) ...
Selecting previously unselected package dbconfig-common.
Unpacking dbconfig-common (from .../dbconfig-common_1.8.47_all.deb) ...
Selecting previously unselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.48-1_all.deb) ...
Selecting previously unselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously unselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.616-1build2_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_amd64.deb) ...
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.31-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.31-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.5.31-0ubuntu0.12.04.1_all.deb) ...
Selecting previously unselected package bacula-director-mysql.
Unpacking bacula-director-mysql (from .../bacula-director-mysql_5.2.5-0ubuntu6.2_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.31-0ubuntu0.12.04.1_amd64.deb) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Setting up mysql-common (5.5.31-0ubuntu0.12.04.1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 159633 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.31-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.10-1_all.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.31-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up libmysqlclient18 (5.5.31-0ubuntu0.12.04.1) ...
Setting up bacula-common-mysql (5.2.5-0ubuntu6.2) ...
Setting up gawk (1:3.1.8+dfsg-0.1ubuntu1) ...
Setting up heirloom-mailx (12.5-1build1) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Setting up bacula-director-common (5.2.5-0ubuntu6.2) ...
Setting up dbconfig-common (1.8.47) ...

Creating config file /etc/dbconfig-common/config with new version
Setting up libnet-daemon-perl (0.48-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.616-1build2) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up mysql-client-core-5.5 (5.5.31-0ubuntu0.12.04.1) ...
Setting up mysql-client-5.5 (5.5.31-0ubuntu0.12.04.1) ...
Setting up mysql-client (5.5.31-0ubuntu0.12.04.1) ...
Setting up bacula-director-mysql (5.2.5-0ubuntu6.2) ...
dbconfig-common: writing config to /etc/dbconfig-common/bacula-director-mysql.conf

Creating config file /etc/dbconfig-common/bacula-director-mysql.conf with new version
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
unable to connect to mysql server.
error encountered creating user:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dbconfig-common: bacula-director-mysql configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing bacula-director-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up mysql-server-core-5.5 (5.5.31-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.31-0ubuntu0.12.04.1) ...
mysql start/running, process 6616
Setting up libhtml-template-perl (2.10-1) ...
Setting up mysql-server (5.5.31-0ubuntu0.12.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 bacula-director-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)


Here are the dialog errors that resulted in "dpkg: error processing
bacula-director-mysql (--configure):":



   ┌────────────────────────────────────────────────────────────────────────────────┤ Configuring bacula-director-mysql ├─────────────────────────────────────────────────────────────────────────────────┐
   │                                                                                                                                                                                                      │
   │ The bacula-director-mysql package must have a database installed and configured before it can be used.  This can be optionally handled with dbconfig-common.                                         │
   │                                                                                                                                                                                                      │
   │ If you are an advanced database administrator and know that you want to perform this configuration manually, or if your database has already been installed and configured, you should refuse this   │
   │ option.  Details on what needs to be done should most likely be provided in /usr/share/doc/bacula-director-mysql.                                                                                    │
   │                                                                                                                                                                                                      │
   │ Otherwise, you should probably choose this option.                                                                                                                                                   │
   │                                                                                                                                                                                                      │
   │ Configure database for bacula-director-mysql with dbconfig-common?                                                                                                                                   │
   │                                                                                                                                                                                                      │
   │                                                             <Yes>                                                                <No>                                                                │
   │                                                                                                                                                                                                      │
   └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


  ┌─────────────────────────────────────────────────────────────────────────────────┤ Configuring bacula-director-mysql ├──────────────────────────────────────────────────────────────────────────────────┐
  │ An error occurred while installing the database:                                                                                                                                                       │
  │                                                                                                                                                                                                        │
  │ ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)                                                                                               │
  │                                                                                                                                                                                                        │
  │ If at this point you choose "retry", you will be prompted with all the configuration questions once more and another attempt will be made at performing the operation. "retry (skip questions)" will   │
  │ immediately attempt the operation again, skipping all questions.  If you choose "abort", the operation will fail and you will need to downgrade, reinstall, reconfigure this package, or otherwise     │
  │ manually intervene to continue using it.  If you choose "ignore", the operation will continue, ignoring further errors from dbconfig-common.                                                           │
  │                                                                                                                                                                                                        │
  │ Next step for database installation:                                                                                                                                                                   │
  │                                                                                                                                                                                                        │
  │                                                                                         abort                                                                                                          │
  │                                                                                         retry                                                                                                          │
  │                                                                                         retry (skip questions)                                                                                         │
  │                                                                                         ignore                                                                                                         │
  │                                                                                                                                                                                                        │
  │                                                                                                                                                                                                        │
  │                                                                                                 <Ok>                                                                                                   │
  │                                                                                                                                                                                                        │
  └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bacula in Ubuntu.
https://bugs.launchpad.net/bugs/1173085

Title:
  bacula-director-mysql tried to run dbconfig-common before mysql-server
  has finished installing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/1173085/+subscriptions



More information about the Ubuntu-server-bugs mailing list