SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On slackware-14.2 I iget the following in error_log when stopping apache:
[Tue Mar 13 11:35:55.001935 2018] [core:error] [pid 1307:tid 140096227051392] (2)No such file or directory: AH00095: failed to remove PID file /var/run/httpd.pid
[Tue Mar 13 11:35:55.001982 2018] [mpm_event:notice] [pid 1307:tid 140096227051392] AH00491: caught SIGTERM, shutting down
The file /var/run/httpd.pid exists while httpd is running.
From what I've been able to find online so far (and my own intuition), this is a minor error that can be safely ignored.
However, it still bothers me.
I'm running Apache/2.4.29 and PHP 7.1.14 (if it were to have any influence)
@bathory: it happens when httpd IS running and I am issueing /etc/rc.d/rc.httpd stop
(I am running this command for specific reasons, one of which being that "restart" does not always suffice in some contexts).
The even stranger thing is that the error happens on several systems with identical configuration, but does not happen on a few others with the same configuration, yet \I haven't been able to discovery any reasons why.
@bathory: it happens when httpd IS running and I am issueing /etc/rc.d/rc.httpd stop
(I am running this command for specific reasons, one of which being that "restart" does not always suffice in some contexts).
The even stranger thing is that the error happens on several systems with identical configuration, but does not happen on a few others with the same configuration, yet \I haven't been able to discovery any reasons why.
D'oh, it looks like a glitch in the startup file. I'm not running the official apache package from Slackware, but according to the following snippet:
Quote:
<snip>
/usr/sbin/apachectl -k stop
killall httpd
# Remove both old and new .pid locations:
rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
<snip>
The startup script first stops/kills httpd and the tries to remove the pid file that is already removed by the previous operation. Maybe the -f switch is not honored?
Despite what I read in `man apachectl`, looking at the ACMD Variable in the /usr/sbin/apachectl script, it sure looks to me like the -k option in /etc/rc.d/rc.httpd is undesired ?
Do you still get the errors in the log if you test /etc/rc.d/rc.httpd without any -k flags ?
HTH
-- kjh
Removed the -k flags from /etc/rc.d/rc.httpd:
Code:
<<snipped from /etc/rc.d/rc.httpd>>
For information on these options, "man apachectl".
case "$1" in
'start')
/usr/sbin/apachectl start # removed -k
;;
'stop')
/usr/sbin/apachectl stop # removed -k
killall httpd
# Remove both old and new .pid locations:
rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
;;
'force-restart')
# Because sometimes restarting through apachectl just doesn't do the trick...
/usr/sbin/apachectl stop # removed -k
killall httpd
# Remove both old and new .pid locations:
rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
/usr/sbin/apachectl start # removed -k
;;
'restart')
/usr/sbin/apachectl restart # removed -k
;;
'graceful')
/usr/sbin/apachectl graceful # removed -k
;;
'graceful-stop')
/usr/sbin/apachectl graceful-stop # removed -k
;;
*)
echo "Usage: $0 {start|stop|restart|graceful|graceful-stop}"
;;
esac
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.