You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/02/02 10:09:20 UTC

[Bug 54519] New: httpd already running

https://issues.apache.org/bugzilla/show_bug.cgi?id=54519

            Bug ID: 54519
           Summary: httpd already running
           Product: Apache httpd-2
           Version: 2.2.22
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: edwardquick@hotmail.com
    Classification: Unclassified

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, 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

This is the version I'm using:

[quick@laptop ~]$ httpd -v
Server version: Apache/2.2.22 (Unix)
Server built:   Apr 30 2012 09:55:05
[quick@laptop ~]$ cat /etc/redhat-release 
Fedora release 17 (Beefy Miracle)

I tested this out on RHEL6 which ships with httpd 2.2.15 and noted that doesn't
suffer the same problem, however I can't see anything in the changelog between
versions 2.2.15 and 2.2.22 which would have caused this problem to occur.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54519] httpd already running

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54519

Edward Quick <ed...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |edwardquick@hotmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54519] httpd already running

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54519

--- Comment #2 from Edward Quick <ed...@hotmail.com> ---
Just for comparison, I carried out the same test on nginx and that was fine. 


[root@laptop run]# ps -ef | grep [n]ginx
root      3055     1  0 21:50 ?        00:00:00 nginx: master process
/usr/sbin/nginx
nginx     3056  3055  0 21:50 ?        00:00:00 nginx: worker process

[root@laptop run]# cat /run/nginx.pid 
3055
[root@laptop run]# kill -9 3055
[root@laptop run]# ps -ef | grep [n]ginx
[root@laptop run]# echo 1 > /run/nginx.pid

[root@laptop run]# /usr/sbin/nginx
[root@laptop run]# ps -ef | grep [n]ginx
root      3144     1  0 21:53 ?        00:00:00 nginx: master process
/usr/sbin/nginx
nginx     3145  3144  0 21:53 ?        00:00:00 nginx: worker process
[root@laptop run]# cat /run/nginx.pid 
3144

[root@laptop run]# nginx -v
nginx version: nginx/1.2.6

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 54519] httpd already running

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54519

Edward Quick <ed...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.2.22                      |2.4.3

--- Comment #1 from Edward Quick <ed...@hotmail.com> ---
I reproduced the problem on Fedora 18 with httpd 2.4.3 as well:

[root@laptop httpd]# ps -ef | grep [h]ttp
root      2326     1  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2327  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2328  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2329  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2330  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2331  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    2332  2326  0 20:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND

[root@laptop httpd]# kill -9 2326
[root@laptop httpd]# ps -ef | grep [h]ttp
[root@laptop httpd]# echo 1 > /var/run/httpd/httpd.pid

[root@laptop httpd]# /usr/sbin/httpd -k start
httpd (pid 1) already running

[root@laptop httpd]# ps -ef | grep [h]ttp

[root@laptop httpd]# httpd -v
Server version: Apache/2.4.3 (Fedora)
Server built:   Jan  8 2013 13:46:23


[root@laptop httpd]# uname -a
Linux laptop 3.7.7-201.fc18.i686 #1 SMP Tue Feb 12 22:59:10 UTC 2013 i686 i686
i386 GNU/Linux

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org