View Issue Details

IDProjectCategoryView StatusLast Update
0000613bareos-coredirectorpublic2020-02-24 11:08
ReporterdpearceFL Assigned To 
Status confirmedResolutionopen 
PlatformLinuxOSCentOSOS Version6
Product Version14.2.6 
Summary0000613: PID file is not cleared when hard reset occurs
DescriptionI am running Bareos on a server that about once a month has a hardware event the causes an instantaneous reboot with no proper shutdown. This is my problem.

However I have noticed that the processes bareos-fd and bareos-sd will recover on reboot even though the PID file for each process still exists.

The process bareos-dir will not start because the PID file still exists but the process is NOT running.

So I'm looking at the code in ./src/lib/bsys.c Line 597 and it mentions bug 0000797 which I can not find.
TagsNo tags attached.
bareos-master: impactyes
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impactyes
bareos-15.2: action
bareos-14.2: impactyes
bareos-14.2: action
bareos-13.2: impactyes
bareos-13.2: action
bareos-12.4: impactyes
bareos-12.4: actionnone




2016-02-03 15:56

reporter   ~0002182

Last edited: 2016-02-03 19:04

If I stop Bareos properly, I notice that pid file for bareos-dir does not get removed. If the PID file were removed on process exit, my issue would still exist.



2020-02-24 11:08

reporter   ~0003851

I think that on CentOS, at least on CentOS7, the pidfile should move to /run
This directory is a temporary filesystem that is recreated at each reboot.

I've had a hard reboot of several machines and the following occured:
- After the hard reboot and another process is running with the process id that is listed in the pidfile
- Bareos-fd is not started as systemd thinks that bareos-fd is already running
- When restarting bareos-fd (with the command systemctl restart bareos-fd), systemd actually kills the other process and then starts bareos-fd.

On machines running eg haproxy, we've had on multiple servers the case that haproxy was killed during restart of bareos-fd.

I think this also applies to other bareos components, like bareos-dir and bareos-sd.

Issue History

Date Modified Username Field Change
2016-02-03 15:38 dpearceFL New Issue
2016-02-03 15:56 dpearceFL Note Added: 0002182
2016-02-03 19:04 dpearceFL Note Edited: 0002182
2016-02-25 17:40 maik bareos-master: impact => yes
2016-02-25 17:40 maik bareos-15.2: impact => yes
2016-02-25 17:40 maik bareos-14.2: impact => yes
2016-02-25 17:40 maik bareos-13.2: impact => yes
2016-02-25 17:40 maik bareos-12.4: impact => yes
2016-02-25 17:40 maik bareos-12.4: action => none
2016-02-25 17:40 maik Status new => confirmed
2020-02-24 11:08 jurgengoedbloed Note Added: 0003851