'/etc/init.d/bacula-fd stop' does not kill bacula-fd. '/etc/init.d/bacula-sd stop' does not kill bacula-sd either. However '/etc/init.d/bacula-dir stop' does it. The problem is in the pid files of bacula-fd and bacula-sd. They are located in /var/run/bacula/, but /etc/init.d/bacula-fd and /etc/init.d/bacula-sd look them up in /var/run directory. The same time bacula-dir.9101.pid file is stored in /var/run directory. If I create a symbolic link for that pids, the problem is gone: # ln -s /var/run/bacula/bacula-fd.9102.pid /var/run/bacula-fd.9102.pid # ln -s /var/run/bacula/bacula-sd.9102.pid /var/run/bacula-sd.9102.pid
(In reply to comment #0) > '/etc/init.d/bacula-fd stop' does not kill bacula-fd. > '/etc/init.d/bacula-sd stop' does not kill bacula-sd either. > > However '/etc/init.d/bacula-dir stop' does it. > > The problem is in the pid files of bacula-fd and bacula-sd. They are located > in /var/run/bacula/, but /etc/init.d/bacula-fd and /etc/init.d/bacula-sd > look them up in /var/run directory. > The same time bacula-dir.9101.pid file is stored in /var/run directory. > > If I create a symbolic link for that pids, the problem is gone: > # ln -s /var/run/bacula/bacula-fd.9102.pid /var/run/bacula-fd.9102.pid > # ln -s /var/run/bacula/bacula-sd.9102.pid /var/run/bacula-sd.9102.pid
Which version we are talking about?
(In reply to comment #2) > Which version we are talking about? I noticed this bug on 5.2.5. A few days ago I updated to 5.2.6. Nothing changed.
(In reply to comment #3) > (In reply to comment #2) > > Which version we are talking about? > > I noticed this bug on 5.2.5. > A few days ago I updated to 5.2.6. > Nothing changed. I double checked the behaviour on a fresh clean install. I can not reproduce the problem. All pid files for all daemons are located in '/var/run'. Starting and stopping of each dameon works without problems. Please check your '/etc/bacula/bacula-{sd,fd,dir}.conf files. There is a 'PidDirectory' directive in it, which points to '/var/run' after install.
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Which version we are talking about? > > > > I noticed this bug on 5.2.5. > > A few days ago I updated to 5.2.6. > > Nothing changed. > > I double checked the behaviour on a fresh clean install. I can not reproduce > the problem. All pid files for all daemons are located in '/var/run'. > Starting and stopping of each dameon works without problems. > > Please check your '/etc/bacula/bacula-{sd,fd,dir}.conf files. There is a > 'PidDirectory' directive in it, which points to '/var/run' after install. Yes, the mistake was in there. I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in bacula-{fd,sd}.conf That's why I didn't find this mistake by grep 'PidDirectory'. There is no any bug here. Thank you.
(In reply to comment #5) > > Yes, the mistake was in there. > I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in > bacula-{fd,sd}.conf > That's why I didn't find this mistake by grep 'PidDirectory'. > Ok. That is what I thought. Glad to help.
(In reply to comment #6) > (In reply to comment #5) > > > > Yes, the mistake was in there. > > I had 'PidDirective' in bacula-dir.conf and 'Pid Directive' in > > bacula-{fd,sd}.conf > > That's why I didn't find this mistake by grep 'PidDirectory'. > > > Ok. That is what I thought. Glad to help. What if I want to change the destination of pid file? If I edit bacula-*.conf file, I will get an error trying to stop/restart bacula by /etc/init.d/bacula* Why not to read the 'PidDirectory' directive before start-stop-daemon runs?
(In reply to comment #7) > (In reply to comment #6) > > What if I want to change the destination of pid file? > > If I edit bacula-*.conf file, I will get an error trying to stop/restart > bacula by /etc/init.d/bacula* > If you want to differ from the normal ebuild settings, than just adapt the path where the init-scripts are looking for the pid files too. But I see no reason to support this from our side.