View Issue Details

IDProjectCategoryView StatusLast Update
0000613bareos-coredirectorpublic2023-07-06 16:17
ReporterdpearceFL Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
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.

Activities

dpearceFL

dpearceFL

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.

jurgengoedbloed

jurgengoedbloed

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.
bruno-at-bareos

bruno-at-bareos

2023-07-06 16:17

manager   ~0005168

Please use current version of bareos. We don't use anymore PID file.

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 Status new => confirmed
2020-02-24 11:08 jurgengoedbloed Note Added: 0003851
2023-07-06 16:17 bruno-at-bareos Assigned To => bruno-at-bareos
2023-07-06 16:17 bruno-at-bareos Status confirmed => closed
2023-07-06 16:17 bruno-at-bareos Resolution open => fixed
2023-07-06 16:17 bruno-at-bareos Note Added: 0005168