Public bug reported: When installing the meta package bacula-server it will reach the point of configuring the database for bacula-director-mysql with dbconfig- common before mysql-server has installed and started. The only way out is to opt out of the automatic database installation and install manually afterwards.
This was previously reported (https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/293515) and marked as fixed, however I've verified this bug is present in all distributions between and including lucid and precise. # apt-get install bacula-server Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-3.2.0-23-generic linux-headers-3.2.0-23 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: bacula-common bacula-common-mysql bacula-director-common bacula-director-mysql bacula-fd bacula-sd bacula-sd-mysql dbconfig-common gawk heirloom-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl liblzo2-2 libmysqlclient18 libnet-daemon-perl libplrpc-perl libsigsegv2 mtx 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 bacula-traymonitor dds2tar scsitools sg3-utils mt-st 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 bacula-fd bacula-sd bacula-sd-mysql bacula-server dbconfig-common gawk heirloom-mailx libdbd-mysql-perl libdbi-perl libhtml-template-perl liblzo2-2 libmysqlclient18 libnet-daemon-perl libplrpc-perl libsigsegv2 mtx 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, 27 newly installed, 0 to remove and 81 not upgraded. Need to get 30.5 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-common amd64 5.2.5-0ubuntu6.2 [621 kB] Get:2 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-common all 5.5.29-0ubuntu0.12.04.1 [13.5 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main libmysqlclient18 amd64 5.5.29-0ubuntu0.12.04.1 [946 kB] Get:4 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-common-mysql amd64 5.2.5-0ubuntu6.2 [75.4 kB] Get:5 http://gb.archive.ubuntu.com/ubuntu/ precise/main libsigsegv2 amd64 2.9-4ubuntu2 [14.6 kB] Get:6 http://gb.archive.ubuntu.com/ubuntu/ precise/main gawk amd64 1:3.1.8+dfsg-0.1ubuntu1 [465 kB] Get:7 http://gb.archive.ubuntu.com/ubuntu/ precise/universe heirloom-mailx amd64 12.5-1build1 [248 kB] Get:8 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-director-common amd64 5.2.5-0ubuntu6.2 [12.4 kB] Get:9 http://gb.archive.ubuntu.com/ubuntu/ precise/main dbconfig-common all 1.8.47 [458 kB] Get:10 http://gb.archive.ubuntu.com/ubuntu/ precise/main libnet-daemon-perl all 0.48-1 [43.1 kB] Get:11 http://gb.archive.ubuntu.com/ubuntu/ precise/main libplrpc-perl all 0.2020-2 [36.0 kB] Get:12 http://gb.archive.ubuntu.com/ubuntu/ precise/main libdbi-perl amd64 1.616-1build2 [849 kB] Get:13 http://gb.archive.ubuntu.com/ubuntu/ precise/main libdbd-mysql-perl amd64 4.020-1build2 [106 kB] Get:14 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-core-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [1,932 kB] Get:15 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [8,323 kB] Get:16 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client all 5.5.29-0ubuntu0.12.04.1 [11.6 kB] Get:17 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-director-mysql amd64 5.2.5-0ubuntu6.2 [280 kB] Get:18 http://gb.archive.ubuntu.com/ubuntu/ precise/main liblzo2-2 amd64 2.06-1 [52.1 kB] Get:19 http://gb.archive.ubuntu.com/ubuntu/ precise/main mtx amd64 1.3.12-4ubuntu1 [150 kB] Get:20 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-sd amd64 5.2.5-0ubuntu6.2 [428 kB] Get:21 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-core-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [6,055 kB] Get:22 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [8,832 kB] Get:23 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-fd amd64 5.2.5-0ubuntu6.2 [91.5 kB] Get:24 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-sd-mysql amd64 5.2.5-0ubuntu6.2 [403 kB] Get:25 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main bacula-server all 5.2.5-0ubuntu6.2 [7,210 B] Get:26 http://gb.archive.ubuntu.com/ubuntu/ precise/main libhtml-template-perl all 2.10-1 [65.0 kB] Get:27 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server all 5.5.29-0ubuntu0.12.04.1 [11.7 kB] Fetched 30.5 MB in 0s (37.1 MB/s) Preconfiguring packages ... Selecting previously unselected package bacula-common. (Reading database ... 79940 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.29-0ubuntu0.12.04.1_all.deb) ... Selecting previously unselected package libmysqlclient18. Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.29-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 ... 80121 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 ... 80219 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.29-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.29-0ubuntu0.12.04.1_amd64.deb) ... Selecting previously unselected package mysql-client. Unpacking mysql-client (from .../mysql-client_5.5.29-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 liblzo2-2. Unpacking liblzo2-2 (from .../liblzo2-2_2.06-1_amd64.deb) ... Selecting previously unselected package mtx. Unpacking mtx (from .../mtx_1.3.12-4ubuntu1_amd64.deb) ... Selecting previously unselected package bacula-sd. Unpacking bacula-sd (from .../bacula-sd_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.29-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.29-0ubuntu0.12.04.1) ... Selecting previously unselected package mysql-server-5.5. (Reading database ... 80899 files and directories currently installed.) Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) ... Selecting previously unselected package bacula-fd. Unpacking bacula-fd (from .../bacula-fd_5.2.5-0ubuntu6.2_amd64.deb) ... Selecting previously unselected package bacula-sd-mysql. Unpacking bacula-sd-mysql (from .../bacula-sd-mysql_5.2.5-0ubuntu6.2_amd64.deb) ... Selecting previously unselected package bacula-server. Unpacking bacula-server (from .../bacula-server_5.2.5-0ubuntu6.2_all.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.29-0ubuntu0.12.04.1_all.deb) ... Processing triggers for man-db ... Processing triggers for ureadahead ... Setting up libmysqlclient18 (5.5.29-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.29-0ubuntu0.12.04.1) ... Setting up mysql-client-5.5 (5.5.29-0ubuntu0.12.04.1) ... Setting up mysql-client (5.5.29-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: trying again. dbconfig-common: writing config to /etc/dbconfig-common/bacula-director-mysql.conf 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: trying again. dbconfig-common: writing config to /etc/dbconfig-common/bacula-director-mysql.conf Replacing config file /etc/dbconfig-common/bacula-director-mysql.conf with new version Processing configuration...Ok. * Starting Bacula Director... [ OK ] Setting up liblzo2-2 (2.06-1) ... Setting up mtx (1.3.12-4ubuntu1) ... Setting up bacula-sd (5.2.5-0ubuntu6.2) ... * Starting Bacula Storage daemon... [ OK ] Setting up mysql-server-core-5.5 (5.5.29-0ubuntu0.12.04.1) ... Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) ... 130205 20:27:35 [Note] Plugin 'FEDERATED' is disabled. 130205 20:27:35 InnoDB: The InnoDB memory heap is disabled 130205 20:27:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130205 20:27:35 InnoDB: Compressed tables use zlib 1.2.3.4 130205 20:27:35 InnoDB: Initializing buffer pool, size = 128.0M 130205 20:27:35 InnoDB: Completed initialization of buffer pool 130205 20:27:35 InnoDB: highest supported file format is Barracuda. 130205 20:27:35 InnoDB: Waiting for the background threads to start 130205 20:27:36 InnoDB: 1.1.8 started; log sequence number 1595675 130205 20:27:36 InnoDB: Starting shutdown... 130205 20:27:37 InnoDB: Shutdown completed; log sequence number 1595675 mysql start/running, process 7674 Setting up bacula-fd (5.2.5-0ubuntu6.2) ... * Starting Bacula File daemon... [ OK ] Setting up bacula-sd-mysql (5.2.5-0ubuntu6.2) ... Setting up bacula-server (5.2.5-0ubuntu6.2) ... Setting up libhtml-template-perl (2.10-1) ... Setting up mysql-server (5.5.29-0ubuntu0.12.04.1) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place You have new mail in /var/mail/root ** Affects: bacula (Ubuntu) Importance: Undecided Status: New -- 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/1116634 Title: bacula-server installation runs dbconfig-common before installing and starting mysql-server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/1116634/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs