Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23854 - Runscript apache restart, doesn't wait for apache shutdown, results in bind failed
Summary: Runscript apache restart, doesn't wait for apache shutdown, results in bind f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-01 23:31 UTC by Andreas Busch
Modified: 2003-07-10 21:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Busch 2003-07-01 23:31:13 UTC
The runscript for apache/apache2 shuts down apache using apachectl stop in
background mode "&>/dev/null". Thus resulting in a "unable to bind" error when
issuing the "restart" parameter if the webserver is not yet finished shutting
down completely due to some pending connections/requests.

Reproducible: Always
Steps to Reproduce:
Issue "/etc/init.d/apache2 restart" when http-server is under heavy load
or on a slow machine.

Actual Results:  
Stopping apache2...
Starting apache2...
(98)Address already in use: make_sock: could nor bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Expected Results:  
Server should shut down cleanly and restart without "can't bind"-error.

Stopping apache2...
Starting apache2...

Modify the runscript line in /etc/init.d/apache2 which says:
/usr/sbin/apache2ctl stop &>/dev/null
to
/usr/sbin/apache2ctl stop >/dev/null
(same for version 1 of apache)

Result:
"/etc/init.d/apache2 restart" works correctly, without
"can't bind"-error on slow or heavy loaded machines.
Comment 1 Donny Davies (RETIRED) gentoo-dev 2003-07-10 21:30:30 UTC
fixed, thank you!