LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-23-2007, 10:09 AM   #1
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Rep: Reputation: 31
Question apache bad file descriptor


I'm seeing this error message each time my Apache server is restarted with apachectl graceful:
Code:
[Tue Oct 23 10:28:01 2007] [notice] Graceful restart requested, doing restart
[Tue Oct 23 10:28:01 2007] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Tue Oct 23 10:28:01 2007] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6  configured -- resuming normal operations
The error isn't fatal: the server does start, as seen in the last line. Nothing in messages except for dropped iptables input.

System: RHEL4u5 Linux, 2 PIII 1 GHz CPUs, 1 GB RAM.

Apache details (built from latest available tar archive):
Code:
]# apachectl -V
Server version: Apache/2.2.6 (Unix)
Server built:   Oct 22 2007 10:22:43
Server's Module Magic Number: 20051115:5
Server loaded:  APR 1.2.11, APR-Util 1.2.10
Compiled using: APR 1.2.11, APR-Util 1.2.10
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/etc/httpd/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 
Old 10-23-2007, 11:15 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Do you get the same error if you do a stop and start?
 
Old 10-23-2007, 11:20 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You might be hitting this bug:

http://issues.apache.org/bugzilla/show_bug.cgi?id=42829

I'd suggest just doing a full stop and start to get around the error until fixed. I never do graceful restarts with apache, never seems to do the job accurately.
 
Old 10-23-2007, 11:23 AM   #4
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
Lightbulb

Quote:
Originally Posted by trickykid View Post
Do you get the same error if you do a stop and start?
Hmmmm ... nope:
Code:
[Tue Oct 23 12:20:13 2007] [notice] caught SIGTERM, shutting down
[Tue Oct 23 12:20:15 2007] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6 OCOL configured -- resuming normal operations
Interesting! Not good, but interesting.

Quote:
Originally Posted by trickykid
I'd suggest just doing a full stop and start to get around the error until fixed. I never do graceful restarts with apache, never seems to do the job accurately.
I think you're right. That bug seems familiar. I've been using "graceful" for some time, because I was told it's the "right" way to restart. But as you said, there seem to be lots of reasons for doing a hard stop/start instead.

The bug page you linked included a patch file. Do you think it's worth trying such a patch? Does Apache follow up on such bugs quickly?

Last edited by deesto; 10-23-2007 at 11:26 AM.
 
Old 10-23-2007, 01:15 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Apache seems to stay updated but I think they try to roll a lot of changes and fixes in at once, so they're not rolling out new fixes every other day. That would put a strain on admins.

I'd say wait for a release, if it's not security related and there's a work around, that's how I deal with such things.
 
  


Reply

Tags
apache, descriptor, error, file


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Apache2] Bad file descriptor CRX Linux - Server 3 06-01-2007 04:06 AM
Bad File Descriptor tech_user Linux - Hardware 0 10-14-2005 03:21 PM
apt-file returns nothing; 'bad file descriptor' overbored Debian 3 10-03-2004 09:13 PM
Evolution: bad file descriptor bfibandit Mandriva 2 04-11-2004 03:00 PM
SIOCSIFADDR: Bad file descriptor egon Linux - Networking 0 02-13-2001 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration