I have spent two days now trying to get Bacula running again after upgrading from Ubuntu 14 to Ubuntu 16.04, but I am out of luck and need help.
Since the version of Bacula changed, I decided to start from scratch with the Ubuntu default config files and moved the old config files into a different folder. The apt installer/package-configurator properly fills out all the daemon-names and passwords in bacula-dir.conf, bacula-fs.conf and bacula-ds.conf
The problem: Bacula-dir does not start properly and seems to hang. The symptoms are:
- No log file is created (/var/log/bacula/bacular.log)
- bconsole connection fails (with error:
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
However I have checked the passwords which have been created by the Ubuntu install/configuration script an they match.
After adding the line "local bacula bacula md5" to /etc/postgresql/9.5/main/pg_hba.conf access to the postgresql database works from the commmand-line ($ psql -d bacula -U bacula
) using the same password as given in bacula-dir.conf.
What is most puzzling: I tried the same installation/configuration steps on another testing machine and there all is working as expected and I can connect with bconsole.
On my upgraded server however I can not find what causes the problem!
So far I have tried the following:
- Completely purged all Bacula packages, then manually searched and removed all old configuration/log/run files in /etc/bacula/ and /var/ and then re-installed the packages
- Downloaded the scripts
drop_postgresql_tables
andmake_postgresql_tables
from the Bacula source package and deleted and re-created the database tables with them - Used
$ ps aux | grep bacula
to list the running Bacula daemons and compare them with the test machine - Run bacula-dir with debug-option (
-d 200
) - please see the attached output - Checked file/folder permissions over and over again and compared with the working test machine
- Firewall? All connections are on the same machine, so that shouldn't be the cause?
Question: What could possibly be wrong with my configuration? How can I narrow-down or isolate the problem?
Last thing I should mention: Bacula was used with mysql before and now after the upgrade to Ubuntu 16, PostgreSQL is used. All old Bacula packages were remove (purged) and the bacula...-mysql packages were replaced the with bacula-common-pgsql, bacula-director-pgsql and bacula-sd-pgsql. Also the database was started from scratch, but could that still somehow be the cause?
Bacula-dir debug output in syslog:
bacula-director[22438]: * Starting Bacula Director... bacula-dir
bacula-director[22438]: bacula-dir: dird.c:194-0 Debug level = 200
bacula-director[22438]: bacula-dir: address_conf.c:264-0 Initaddr 0.0.0.0:9101
bacula-director[22438]: bacula-dir: runscript.c:284-0 runscript: debug
bacula-director[22438]: bacula-dir: runscript.c:285-0 --> RunScript
bacula-director[22438]: bacula-dir: runscript.c:286-0 --> Command=/etc/bacula/scripts/make_catalog_backup.pl MyCatalog
bacula-director[22438]: bacula-dir: runscript.c:287-0 --> Target=
bacula-director[22438]: bacula-dir: runscript.c:288-0 --> RunOnSuccess=1
bacula-director[22438]: bacula-dir: runscript.c:289-0 --> RunOnFailure=0
bacula-director[22438]: bacula-dir: runscript.c:290-0 --> FailJobOnError=1
bacula-director[22438]: bacula-dir: runscript.c:291-0 --> RunWhen=2
bacula-director[22438]: bacula-dir: runscript.c:284-0 runscript: debug
bacula-director[22438]: bacula-dir: runscript.c:285-0 --> RunScript
bacula-director[22438]: bacula-dir: runscript.c:286-0 --> Command=/etc/bacula/scripts/delete_catalog_backup
bacula-director[22438]: bacula-dir: runscript.c:287-0 --> Target=
bacula-director[22438]: bacula-dir: runscript.c:288-0 --> RunOnSuccess=1
bacula-director[22438]: bacula-dir: runscript.c:289-0 --> RunOnFailure=0
bacula-director[22438]: bacula-dir: runscript.c:290-0 --> FailJobOnError=1
bacula-director[22438]: bacula-dir: runscript.c:291-0 --> RunWhen=1
bacula-director[22438]: bacula-dir: jcr.c:128-0 read_last_jobs seek to 192
bacula-director[22438]: bacula-dir: jcr.c:135-0 Read num_items=0
bacula-director[22438]: bacula-dir: dir_plugins.c:148-0 Load dir plugins
bacula-director[22438]: bacula-dir: dir_plugins.c:150-0 No dir plugin dir!
bacula-director[22438]: ...done.
bacula-director[22438]: bacula-dir: lockmgr.c:728-0 Exit check_deadlock.
bacula-director[22438]: bacula-dir: postgresql.c:1117-0 db_init_database first time
bacula-director[22438]: bacula-dir: postgresql.c:229-0 pg_real_connect done
bacula-director[22438]: bacula-dir: postgresql.c:231-0 db_user=bacula db_name=bacula db_password=XXXXXX
bacula-director[22438]: bacula-dir: sql_create.c:345-0 In create mediatype
bacula-director[22438]: bacula-dir: sql_create.c:349-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File1'
bacula-director[22438]: bacula-dir: sql_create.c:345-0 In create mediatype
bacula-director[22438]: bacula-dir: sql_create.c:349-0 selectmediatype: SELECT MediaTypeId,MediaType FROM MediaType WHERE MediaType='File2'
bacula-director[22438]: memo-dir: dird.c:323-0 Start UA server
bacula-director[22438]: memo-dir: job.c:1528-0 wstorage=File1
bacula-director[22438]: memo-dir: bnet_server.c:87-0 Addresses 127.0.0.1:9101
bacula-director[22438]: memo-dir: job.c:1537-0 wstore=File1 where=Job resource
bacula-director[22438]: memo-dir: job.c:1211-0 JobId=0 created Job=*JobMonitor*.2018-05-09_11.45.24_01
bacula-director[22438]: memo-dir: dird.c:334-0 wait for next job