[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-httpd-users
Subject: [users@httpd] httpd already running
From: Edward Quick <edwardquick () hotmail ! com>
Date: 2013-01-31 21:22:00
Message-ID: DUB002-W47D96EEE7C2BB99E84679FAB1D0 () phx ! gbl
[Download RAW message or body]
Hi,
I'm wondering if the following scenario is a bug or designed, because if httpd dies \
and leaves behind a pidfile containing a pid which later gets reused, the httpd \
refuses to come back up. I've already seen this in production, where a host has \
crashed and on coming back up the web server fails to start because something else \
has grabed the pid.
To reproduce the problem I can do this:
[root@laptop httpd]# pkill -9 httpd
[root@laptop httpd]# pgrep httpd
[root@laptop httpd]# echo 1 > /var/run/httpd/httpd.pid
[root@laptop httpd]# /usr/sbin/httpd -k start
httpd: Could not reliably determine the server's fully qualified domain name, using \
fe80::201:4aff:fe5e:5331 for ServerName httpd (pid 1) already running
I wondered whether fedora 17 might have coded round this, but no:
[root@laptop httpd]# systemctl start httpd.service
Job failed. See system journal and 'systemctl status' for details.
[root@laptop httpd]# systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: failed (Result: resources) since Thu, 31 Jan 2013 21:05:36 +0000; 3s \
ago
Process: 2228 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, \
status=0/SUCCESS) CGroup: name=systemd:/system/httpd.service
Jan 31 21:05:36 laptop httpd[2228]: httpd: Could not reliably determine the...me
Jan 31 21:05:36 laptop httpd[2228]: httpd (pid 1) already running
[root@laptop httpd]#
[root@laptop httpd]# pgrep httpd
[root@laptop httpd]#
I tested this out on RHEL6 which ships with httpd 2.2.15 and noted that doesn't \
suffer the same problem so presumably a patch has gone into httpd since then, but I \
can't see the logic for the situation above.
Thanks for any guidance on this.
Edward.
[Attachment #3 (text/html)]
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br><br>I'm wondering if the following \
scenario is a bug or designed, because if httpd dies and leaves behind a pidfile \
containing a pid which later gets reused, the httpd refuses to come back up. I've \
already seen this in production, where a host has crashed and on coming back up the \
web server fails to start because something else has grabed the pid.<br><br>To \
reproduce the problem I can do this:<br><br>[root@laptop httpd]# pkill -9 \
httpd<br>[root@laptop httpd]# pgrep httpd<br>[root@laptop httpd]# echo 1 > \
/var/run/httpd/httpd.pid <br><br>[root@laptop httpd]# /usr/sbin/httpd -k \
start<br>httpd: Could not reliably determine the server's fully qualified domain \
name, using fe80::201:4aff:fe5e:5331 for ServerName<br>httpd (pid 1) already \
running<br><br>I wondered whether fedora 17 might have coded round this, but \
no:<br><br>[root@laptop httpd]# systemctl start httpd.service<br>Job failed. See \
system journal and 'systemctl status' for details.<br>[root@laptop httpd]# systemctl \
status httpd.service<br>httpd.service - The Apache HTTP Server (prefork \
MPM)<br> Loaded: loaded \
(/usr/lib/systemd/system/httpd.service; disabled)<br> \
Active: failed (Result: resources) since Thu, 31 Jan 2013 21:05:36 +0000; 3s \
ago<br> Process: 2228 ExecStart=/usr/sbin/httpd $OPTIONS -k \
start (code=exited, status=0/SUCCESS)<br> CGroup: \
name=systemd:/system/httpd.service<br><br>Jan 31 21:05:36 laptop httpd[2228]: httpd: \
Could not reliably determine the...me<br>Jan 31 21:05:36 laptop httpd[2228]: httpd \
(pid 1) already running<br>[root@laptop httpd]# <br><br>[root@laptop httpd]# pgrep \
httpd<br>[root@laptop httpd]# <br><br>I tested this out on RHEL6 which ships with \
httpd 2.2.15 and noted that doesn't suffer the same problem so presumably a patch has \
gone into httpd since then, but I can't see the logic for the situation above. \
<br><br>Thanks for any guidance on this.<br>Edward.<br><br> </div></body> \
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic