Bacula Client Package doesn't work on 2.2-rc
-
To be fair the bacula client has never worked without linking files and manually editing the configuration file, so most of this isn't really a 2.2 issue. But things have now deteriated beyond my abilities to resolve the issues and the bacula client just doesn't run.
Straight after a clean install of Bacula 7.0.5 pkg v 1.0.3 on 2.2-RC (amd64) built on Thu Dec 11 03:41:41 CST 2014 the following files existed
[2.2-RC][root@pfsense03]/root: find / -name "acula"
/usr/local/sbin/bacula-fd
/usr/local/pkg/bacula-client.xml
/usr/local/pkg/bacula-client.inc
/usr/local/pkg/bacula-client_fd.xml
/usr/local/www/bacula-client_view_config.php
/usr/pbi/rc.d/bacula-fd
/usr/pbi/bin/bacula-fd
/usr/pbi/bacula-amd64
/usr/pbi/bacula-amd64/local/sbin/bacula-fd
/usr/pbi/bacula-amd64/local/share/bacula
/usr/pbi/bacula-amd64/local/etc/bacula
/usr/pbi/bacula-amd64/local/etc/bacula/bacula-fd.conf.sample
/usr/pbi/bacula-amd64/local/etc/bacula/bacula-fd.conf
/usr/pbi/bacula-amd64/local/etc/rc.d/bacula-fd
/usr/pbi/bacula-amd64/rc.d/bacula-fd
/usr/pbi/bacula-amd64/rc.d/bacula-fd.pbiopt
/usr/pbi/bacula-amd64/bin/bacula-fd
/usr/pbi/bacula-amd64/bin/bacula-fd.pbiopt
/var/db/pbi/installed/bacula-7.0.5-amd64
/var/db/pbi/.hashqueue/bacula-7.0.5-amd64
/tmp/bacula-client.infoThe bacula file daemon fails to start and I can find no errors in the logs.
The configuration file produced from the GUI makes no sense at all to me, but maybe I am missing something. I have been running multiple Bacula servers for 5-6 years now and although I am no expert, but I do not consider myself a Bacula novice either.
What is a "local" director? There is no such concept in Bacula, but the configuration screen says that you must have one?
Creating a "local" director is the only way of creating a FileDaemon record with a correct Name attribute, but it always appends a "-fd" suffix to the name. While this is the convention followed in the documentation (and a convention that I follow), the Name attribute is just a string and can be anything.
Creating a local director also creates two Director records (a full one and a monitor one) and a Messages record, none of which make sense to me. I can understand creating a Monitor director record in some circumstances, but generally not on servers and not on pfSense and a way is provided to create a separate monitor record, so why force the creation of one with the local director? Again the user doesn't have control of the record with "-dir" and "-mon" being hard coded. Why a full director record that is local to the pfSense machine? Director records are controlling director access to the FD. There is no director on the pfSense box and I would not have thought that there ever would be?
Creating a Message record that points at the local director is also wrong in my opinion. It will actually do what is probably intended as the destination specified in the director attribute of the message record is currently ignored and the messages will always be sent the director that starts the job no matter what is specified.
Creating a "local" director only, gives the following confguration file:
Director {
Name = pfsense03-dir #
Password = ""
}
Director {
Name = pfsense03-mon #
Password = ""
Monitor = yes
}
Messages {
Name = Standard
director = pfsense03-dir = all, !skipped, !restored
}
FileDaemon {
Name = pfsense03-fd #
FDport = 9102
WorkingDirectory = /var/db/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}Attempting to start the FD from the command line to get more information as the GUI doesn't seem to do anything.
[2.2-RC][root@pfsense03]/root: /usr/pbi/bacula-amd64/rc.d/bacula-fd onestart
Starting bacula_fd.
12-Dec 14:36 pf22-packages-amd64-fd: ERROR TERMINATION at util.c:858
Working Directory: "/var/db/bacula" not found. Cannot continue.
/usr/pbi/bacula-amd64/local/etc/rc.d/bacula-fd: WARNING: failed to start bacula_fdCreating the missing directory and trying again
[2.2-RC][root@pfsense03]/root: mkdir -p /var/db/bacula
[2.2-RC][root@pfsense03]/root: /usr/pbi/bacula-amd64/rc.d/bacula-fd onestart
Starting bacula_fd.
[2.2-RC][root@pfsense03]/root: ps fauxwww | grep bacula
root 20954 0.0 1.4 56416 6964 - Ss 2:41PM 0:00.00 /usr/local/sbin/bacula-fd -u root -g wheel -v -c /usr/local/etc/bacula/bacula-fd.conf
root 21398 0.0 0.5 18884 2360 0 S+ 2:41PM 0:00.00 grep baculaSo now the FD is running, supposedly, with a configuration file that doesn't actually exist.
[2.2-RC][root@pfsense03]/root: ls -l /usr/local/etc/bacula/bacula-fd.conf
ls: /usr/local/etc/bacula/bacula-fd.conf: No such file or directoryAt this point I gave up and did things by hand. My minimal FD configuration is
Director {
Name = bacula03-dir #
Password = "******************************"
}
Messages {
Name = Standard
director = bacula03-dir = all, !skipped, !restored
}
FileDaemon {
Name = pfsense03-fd #
FDport = 9102
WorkingDirectory = /var/db/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}and ran
/usr/local/sbin/bacula-fd -u root -g wheel -v -c /usr/pbi/bacula-amd64/local/etc/bacula-fd.conf
Which works as long as I don't use the GUI and until the next reboot, but at least I can now get a backup.
I have no knowledge of PHP so I can't really troubleshoot this any further, but am happy provide any additional information that is required.
Thanks
Mike
-
Bumping this now that 2.2 has been released.
Behaviour remains the same.
Thanks
Mike
-
I logged a bug 4 days ago: https://redmine.pfsense.org/issues/4307 and supplied a patch for the typo in the config.
I'd fix this configuration issue myself if I knew how to do so with a READONLY filesystem.
-
I guess you are running nanoBSD. To switch to READWRITE:
1 ) From command line:/etc/rc.conf_mount_rw
and switch back when finished:
/etc/rc.conf_mount_ro
- web GUI, Diagnostics->nanoBSD, press the "Switch to Read/Write" button.
Then you can change and test stuff.
But if you are just editing some PHP code, you can use Diagnostics->Edit file and it switches to RW each time you press Save.
-
See https://forum.pfsense.org/index.php?topic=87705.0
Steve
-
Bacula should be OK now on 2.2, as of package version 1.0.6.