F11: httpd problems [SOLVED]

Daniel B. Thurman dant at cdkkt.com
Wed Aug 26 00:01:46 UTC 2009


On 08/25/2009 04:41 PM, Rick Stevens wrote:
> Daniel B. Thurman wrote:
>>
>> To my surpise, I somehow ended up not
>> being able to shutdown httpd!
>>
>> # killall httpd
>> # service httpd start
>> Starting httpd:                                            [  OK  ]
>> # service httpd stop
>> Stopping httpd:                                            [FAILED]
>> # service httpd restart
>> Stopping httpd:                                            [FAILED]
>> Starting httpd: (98)Address already in use: make_sock: could not bind 
>> to address [::]:80
>> (98)Address already in use: make_sock: could not bind to address 
>> 0.0.0.0:80
>> no listening sockets available, shutting down
>> Unable to open logs
>>
>> and yet all of the httpd daemons are still running.
>>
>> I can stop all of the httpd with the killall command
>> but the point is, why does the service command fail
>> to shut it down?
>>
>> Note, that when rebooting, httpd starts up with no
>> reported errors as far as I can tell, it is not in the
>> messages logs.
>>
>> Any pointers on this?
>
> That's usually caused by the httpd.pid file being in a different spot
> than the startup script expects it to be.  The "stop" looks for that
> file and uses the PID inside it to kill Apache.  If the file can't
> be found, it aborts the shutdown.
>
> The scripts expcect the pid file to be /var/run/httpd/httpd.pid.  Check
> your /etc/httpd/conf/httpd.conf file and make sure that the "PidFile 
> argument agrees with that.
> ----------------------------------------------------------------------
> - Rick Stevens, Systems Engineer                      ricks at nerd.com -
> - AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
> -                                                                    -
> -      Always remember you're unique, just like everyone else.       -
> ----------------------------------------------------------------------
>

Note: my followup posting mentioned the correct pid
location as you did and I checked the script verbosley.

But I now understand how the problem was created!

I ran: System->Administration->Server Settings->HTTP
and by default, it provides: /var/run/httpd.pid which is
not the same as /var/run/httpd/httpd.pid for which the
/etc/init.d/httpd script expects where the pid file should
be!

So, I re-ran that program and fixed the correct pid path
location, killall httpd, and used service httpd start/stop
and it all works correctly now.

So that little program (System->...->HTTP) should be
updated to reflect the proper pid path location - this
could be a minor issue, but can cause others headaches
in trying to figure it out! ;)

Dan




More information about the fedora-list mailing list