View Issue Details

IDProjectCategoryView StatusLast Update
0000928bareos-corefile daemonpublic2023-07-05 16:48
Reportervorlon Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
Summary0000928: using non-default port conflicts with systemd unit (and init script) PIDFile
DescriptionThe FD write its PID file based on the port being used, so if using 19102 the PID file is bareos-fd.19102.pid. However the systemd unit expects a PID file named /var/lib/bareos/bareos-fd.9102.pid. The init file uses a variable which is set to 9102 as well.
This leads to systemctl timing out when starting bareos-fd:

# systemctl restart bareos-filedaemon.service
Job for bareos-filedaemon.service failed because a timeout was exceeded. See "systemctl status bareos-filedaemon.service" and "journalctl -xe" for details.

The log complains:

systemd[1]: bareos-filedaemon.service: PID file /var/lib/bareos/bareos-fd.9102.pid not readable (yet?) after start: No such file or directory



It would be nice to change this behaviour or at least insert a warning into the documentation at the FD port setting.
Steps To Reproduce1. set FD Port to non-default value
2. use systemctl restart bareos-fd.service
or systemctl restart bareos-filedaemon-service
TagsNo tags attached.

Relationships

has duplicate 0001097 closedarogge Systemd expexts bareos-fd to be on port 9102 

Activities

MarceloRuiz

MarceloRuiz

2018-03-17 03:29

reporter   ~0002947

Same thing happens in Ubuntu with bareos 16.2
joergs

joergs

2018-04-05 13:02

developer   ~0002961

Well, a general warning about this can easily be added to the documentation, specifically at http://doc.bareos.org/master/html/bareos-manual-main-reference.html#directiveFdClientFD%20Port
like:
Warning: changing the default port only affects the daemon itself. Start- and Stop-Scripts must be adapted manually.

However, does this really helps? Is there a better way to cope with this issue? Bear in mind, that it should still be (manually) possible, to run multiple instances at the same time.
arogge

arogge

2019-01-16 16:27

manager   ~0003194

The right way is probably to change the systemd service to not use type=forking, but type=simple or type=exec.
In the end it is probably best to use type=notify. However, this requires systemd support in the bareos services.

All of these startup types don't need a pidfile, so systemd won't care what the pidfile is called anymore.
bruno-at-bareos

bruno-at-bareos

2023-07-05 16:48

manager   ~0005157

our systemd unit doesn't use anymore PID, nor specific port and no more forking since 21.

Issue History

Date Modified Username Field Change
2018-03-09 16:18 vorlon New Issue
2018-03-17 03:29 MarceloRuiz Note Added: 0002947
2018-04-05 13:02 joergs Note Added: 0002961
2018-04-05 13:02 joergs Status new => feedback
2019-01-16 16:27 arogge Note Added: 0003194
2019-07-04 15:56 arogge Relationship added has duplicate 0001097
2019-07-04 15:57 arogge Assigned To => arogge
2019-07-04 15:57 arogge Status feedback => acknowledged
2019-07-04 15:57 arogge Assigned To arogge =>
2019-07-04 15:57 arogge Status acknowledged => confirmed
2023-07-05 16:48 bruno-at-bareos Assigned To => bruno-at-bareos
2023-07-05 16:48 bruno-at-bareos Status confirmed => closed
2023-07-05 16:48 bruno-at-bareos Resolution open => fixed
2023-07-05 16:48 bruno-at-bareos Note Added: 0005157