Foreword: I have already resolved this problem and am asking this question to share the solution I've found. Please bear in mind that the problem described here may (or may not) be more generic and could apply not only to Bacula but to other services as well. It might also be Debian-specific as this seems to be the matter of packaging but I currently cannot test it on any other distro.
The question:
Setting up a Bacula installation I've encountered a peculiar behaviour of the file daemon:
/etc/init.d/bacula-fd start
starts the daemon OK/etc/init.d/bacula-fd stop
fails to stop the daemon- consequently
/etc/init.d/bacula-fd restart
fails as well (PID doesn't change), so new config does not apply /etc/init.d/bacula-fd status
returnsbacula-fd is not running ... failed!
even thoughps aux | grep bacula-fd
shows the daemon is in fact running
The PID file is present where it is configured to reside and its content is correct.
The system is Debian Wheezy, Bacula version is 5.2.6 (the latest available in Wheezy repository).
The problem only exists on some of the machines where Bacula is installed, on several others it works just fine.
The FileDaemon section from /etc/bacula/bacula-fd.conf
on an affected machine:
FileDaemon { Name = (name here) FDAddress = (public IP here) FDport = 13802 WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 }
And one from an unaffected machine:
FileDaemon { Name = (name here) FDport = 9102 WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 FDAddress = 192.168.1.10
If I don't get this resolved I cannot employ scripts to automatically apply configuration changes on all my Bacula machines. What could possibly be the cause of this behaviour and how do I resolve this?