HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Apache error: Bad file descriptor: apr_socket_accept (http://www.howtoforge.com/forums/showthread.php?t=26571)

Hans 4th September 2008 18:38

Apache error: Bad file descriptor: apr_socket_accept
 
Within my Apache2 error.log file, i see several error messages like:

[error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[warn] long lost child came home! (pid 12345)
[notice] Graceful restart requested, doing restart
[error] (9)Bad file descriptor: apr_socket_accept: (client socket)
(9)Bad file descriptor: apr_socket_accept: (client socket)

The Bad file descriptor error message seems to appear everytime Apache restarts.
Does anyone what this error message means?

I had this problem in the past too and understand that it seams to be a bug in Apache2, but now i am not sure...

Debian Etch/Apache 2.2.3.

Can anyone tell me more about such an error end if possible how to ovoid it.

Thanks in advance!

falko 5th September 2008 12:34

Have you tried to upgrade Debian's Apache package?

Hans 5th September 2008 13:50

Quote:

Originally Posted by falko (Post 143765)
Have you tried to upgrade Debian's Apache package?

(I know it is not the latest Apache2 version available) but the latest Apache2 version wich comes with Etch is 2.2.3.

And as you can see, all the packages are installed already:

# apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
Reading package lists... Done
Building dependency tree... Done
apache2 is already the newest version.
apache2-doc is already the newest version.
apache2-mpm-prefork is already the newest version.
apache2-utils is already the newest version.
libexpat1 is already the newest version.
ssl-cert is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

My system is up to date as i do an apt-get update/upgrade every single day.

httpd -V also gives me:Apache 2.2.3

falko 6th September 2008 11:45

Seems to be a problem with graceful restarts:
http://www.linuxquestions.org/questi...riptor-593925/
https://issues.apache.org/bugzilla/s...g.cgi?id=42829
Do you get the same error when you run a normal restart or a stop and then start?

Hans 6th September 2008 12:25

Thanks Falko,
That are the articles i found too. For this reason i think indeed it's a bug in Apache 2.2.3.

Quote:

Originally Posted by falko (Post 143900)
Do you get the same error when you run a normal restart or a stop and then start?

When i do a normal start/stop or restart i don't have any error in /var/log/apache2/error.log.

falko 7th September 2008 16:55

According to http://www.linuxquestions.org/questi...riptor-593925/ , this is also a problem with 2.2.6 (and probably 2.2.4 and 2.2.5 as well).

Hans 8th September 2008 12:34

I guess i have to wait until Debian Lenny comes out. I've read Lenny will come with Apache2 version 2.2.9.

ejmarten 31st August 2010 19:25

Try different MPM module
 
Have you tried installing apache with a different MPM module? If your website/webapp uses a connector to a multithreaded backend (ajp13?), you might want to try using the worker MPM.

#apt-get install apache2 apache2-doc apache2-mpm-worker apache2-utils libexpat1 ssl-cert

The error message itself might be a bug:
https://issues.apache.org/bugzilla/s...g.cgi?id=42829

The work around is to do a hard restart instead of a graceful restart when using mod_prefork.

If you have apache managing multiple ajp13 backend connections, I would try running mod_worker, not as a workaround to this bug, but for better performance and reliability.

Buddhiran 30th June 2014 18:58

Bad file descriptor: apr_socket_accept
 
Please check your virtual host has correct parameters. If you have wrong parameters there you will get the same exception.:cool:


All times are GMT +2. The time now is 07:33.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.