From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Description of problem:
The init.d script /etc/init.d/httpd kills the httpd daemon via
If I run multiple httpd daemons a
kills every apache webserver.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
< killproc $httpd
> kill `cat /var/run/httpd.pid`
The current behaviour should be as follows:
- if /var/run/httpd.pid exists, "service httpd stop" will kill only
the PID stored in that file
- otherwise, "service httpd stop" kills all processes named "httpd"
Do you see behaviour different to that?
(In reply to comment #1)
> The current behaviour should be as follows:
> - if /var/run/httpd.pid exists, "service httpd stop" will kill only
> the PID stored in that file
> - otherwise, "service httpd stop" kills all processes named "httpd"
That is actually improper behaviour. If there's no .pid file than "service httpd
stop" should fail in case of multiple instances.
We run jailed environments which are replicas of host system. Which in turn
means we have multiple "httpd" running from different jails and just shooting
processes left and righ is not an option. There are other cases when this is not
applicable: on some machines we run multiple instances without jailed
environment and problems like bug #114619 plus #113935 make our lifes much
harder then they should be; etc.
Hope you will consider re-opening this bug and providing fix for the problem.
Even using plain "apachectl stop" instead of "killproc $httpd" fixes the problem.
We (using RHEL 4) would also very much like Red Hat to add support for having
several instances of httpd (with different configurations) running. As stated,
the most important aspect of this is that the init-script should (only) look in
the pid-file, and at no time send kill-signals all httpd instances. Also, the
OPTIONS environment in the init-script should be exported, so that apachectl
will work with correct parameters, e.g. pick up the right "-f
/etc/httpd/conf/FOO.conf" parameter for configtests, etc.