View previous topic :: View next topic |
Author |
Message |
chidrob n00b
Joined: 07 Aug 2002 Posts: 17
|
Posted: Fri Sep 27, 2002 1:39 am Post subject: /etc/init.d/syslog-ng stop fails the first time |
|
|
When I do /etc/init.d/syslog-ng stop, it finishes ok but syslog-ng does not stop.
Both /var/run/syslog-ng.pid and /proc/nnnnn are not killed. If I do a ps -x I see syslog-ng running. I must repeat the command for syslog-ng to finish ok.
The problems is: the first stop command always fails and the second always goes ok. Also, it seems a problem with start-stop-daemon because I see the problem when calling it directly.
syslog-ng is the only daemon with this problem.
I am using Gentoo 1.4_RC1.
Any hint?
Some examples/tests of what I am saying. I have marked the interersting
lines with "UNEXPECTED ERROR".
Example 1 (with some little editing):
bash-2.05a# /etc/init.d/syslog-ng stop
* ERROR: "syslog-ng" has not yet been started.
bash-2.05a# /etc/init.d/syslog-ng start
* Starting syslog-ng... [ ok ]
bash-2.05a# /etc/init.d/syslog-ng stop
* Stopping syslog-ng... [ ok ]
bash-2.05a# /etc/init.d/syslog-ng start
* Starting syslog-ng...
* Failed to start syslog-ng <<< UNEXPECTED ERROR [ !! ]
bash-2.05a# /etc/init.d/syslog-ng stop
* ERROR: "syslog-ng" has not yet been started.
bash-2.05a# /etc/init.d/syslog-ng start
* Starting syslog-ng... [ ok ]
bash-2.05a#
Example 2 (also with some editing):
bash-2.05a# /etc/init.d/syslog-ng restart
* Stopping syslog-ng... [ ok ]
* Starting syslog-ng...
* Failed to start syslog-ng <<< UNEXPECTED ERROR [ !! ]
bash-2.05a# /etc/init.d/syslog-ng restart
* ERROR: "syslog-ng" has not yet been started.
bash-2.05a# /etc/init.d/syslog-ng stop
* ERROR: "syslog-ng" has not yet been started.
bash-2.05a# /etc/init.d/syslog-ng start
* Starting syslog-ng... [ ok ]
bash-2.05a#
Example 3 (also edited):
bash-2.05a# start-stop-daemon -p /var/run/syslog-ng.pid -S -x /usr/sbin/syslog-ng
bash-2.05a# start-stop-daemon -p /var/run/syslog-ng.pid -v -K -p /var/run/syslog-ng.pid
Stopped process in pidfile `/var/run/syslog-ng.pid' (pid 20250).
bash-2.05a# start-stop-daemon -p /var/run/syslog-ng.pid -S -x /usr/sbin/syslog-ng
/usr/sbin/syslog-ng already running. <<< UNEXPECTED ERROR
bash-2.05a# start-stop-daemon -p /var/run/syslog-ng.pid -v -K -p /var/run/syslog-ng.pid
Stopped process in pidfile `/var/run/syslog-ng.pid' (pid 20250).
bash-2.05a# start-stop-daemon -p /var/run/syslog-ng.pid -S -x /usr/sbin/syslog-ng |
|
Back to top |
|
|
betaphi1319 n00b
Joined: 29 Apr 2002 Posts: 25 Location: Denver, CO, US
|
Posted: Mon Oct 07, 2002 12:33 pm Post subject: |
|
|
It seems that the start-stop-daemon doesn't correctly remove the .pid file from /var/run for syslog-ng when syslog-ng is stopped. Running /etc/init.d/syslog-ng start the first time seems to clean out the pid file, and then running it again allows it to begin. |
|
Back to top |
|
|
|