Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152587 - apache cannot be restarted by a demon
Summary: apache cannot be restarted by a demon
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-23 12:46 UTC by Zdenek Behan
Modified: 2006-10-23 20:50 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 Zdenek Behan 2006-10-23 12:46:03 UTC
When using /etc/init.d/apache2 start|restart from within a terminalless daemon (cron, watchdog, ..), apache2 instead of starting generates quite a few of he following lines into its error_log:

[error] (88)Socket operation on non-socket: apr_accept: (client socket)

The reason for this is apache starting without stdin connected.
Same behaviour as that of daemons can be repeated by closing fd 0 when running the command from within bash:

/etc/init.d/apache2 restart 0>&-

This acts as if everything went fine, except apache does not really start and produces the described error messages.

Tested for current x86 stable version of apache, but it is an upstream unfixed bug, so i believe the same thing should apply for ALL other versions of apache in portage.

Fixes are:
1) run apache using "screen /etc/init.d/apache2 restart"
2) connect /dev/null to its stdin... "/etc/init.d/apache2 restart </dev/null"
3) probably the best solution: modify the apache2 init script to do something similar to 2)
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-10-23 20:50:35 UTC
http://issues.apache.org/bugzilla/show_bug.cgi?id=15161
http://issues.apache.org/bugzilla/show_bug.cgi?id=33994

This is a problem with the software calling apache, not with apache. The software calling apache has closed stderr and/or stdout. It could also be caused by extreme ulimits.

If this is different from the above bugs, please file a new bug upstream.