The other service files use -f, but it looks like bacula-sd was broken by this
change:

------------------------------------------------------------------------------
commit e40b2a6ba9bf946b6e8f189e86729b7b262aaee6
Author: Alain Spineux <al...@baculasystems.com>
Date:   Wed Dec 2 16:17:54 2020 +0100

    Fix #7113 Enable timestamp in tracefile for SD

diff --git a/bacula/platforms/systemd/bacula-sd.service.in 
b/bacula/platforms/systemd/bacula-sd.service.in
index ba15a6640..2fb45bf1d 100644
--- a/bacula/platforms/systemd/bacula-sd.service.in
+++ b/bacula/platforms/systemd/bacula-sd.service.in
@@ -24,8 +24,12 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 Type=simple
 User=@sd_user@
 Group=@sd_group@
-ExecStart=@sbindir@/bacula-sd -fP -c @sysconfdir@/bacula-sd.conf
-SuccessExitStatus=15
+Environment="LD_LIBRARY_PATH=@libdir@"
+# comment out to get traces working at startup using -T and -d options
+#WorkingDirectory=@working_dir@
+ExecStart=@sbindir@/bacula-sd -dt -c @sysconfdir@/bacula-sd.conf
+StandardError=syslog
+TimeoutStopSec=3min
 LimitMEMLOCK=infinity
 
 [Install]
------------------------------------------------------------------------------

I've just added this to https://bugs.bacula.org/view.php?id=2657

__Martin


>>>>> On Mon, 01 Aug 2022 14:49:10 -0400, mark bergman said:
> 
> While bacula-sd would start fine when run manually at the command-line
> with "/opt/bacula/bin/bacula-sd", running it as a systemd service
> consistently resulted in the daemon starting and then stopping almost
> immediately, with no errors from bacula-sd and with systemd reporting
> just an 'unknown error'.
> 
> If the daemon was run with "-T -d xxx -f", it would remain running.
> 
> Modifying the systemd service file 
> (/usr/lib/systemd/system/bacula-sd.service) to use:
> 
>       Type=forking
> 
> (instead of "Type=simple") allowed the daemon to start correctly under
> systemd without any debugging options.
> 
> Thanks,
> 
> Mark
> 
> -- 
> Mark Bergman                                           voice: 215-746-4061    
>    
> mark.berg...@pennmedicine.upenn.edu                      fax: 215-614-0266
> http://www.med.upenn.edu/cbica/
> IT Technical Director, Center for Biomedical Image Computing and Analytics
> Department of Radiology                         University of Pennsylvania
> 
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to