Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th July 2008, 07:29 PM
angusm Offline
Registered User
 
Join Date: Jul 2008
Posts: 4
Apache fails to start when listening on specific IP

I have an Apache 2.2.8 install running on a Fedora Core 7 box. The server runs fine, and has been serving multiple name-based virtual hosts without problems for several months.

The 'httpd.conf' file contains a single Listen instruction, of the form:

Listen 80

My server currently has three IPs configured on the NIC, and because the configuration doesn't specify an IP, it listens on all of them. I'd like to restrict Apache to using just one.

However, if I change that instruction to

Listen x.x.x.x:80

(where 'x.x.x.x' stands for the actual IP of my server), Apache fails to start up, reporting:

(98)Address already in use: make_sock: could not bind to address x.x.x.x:80
no listening sockets available, shutting down

Restoring the original Listen instruction allows it to work again.

Shutting down Apache and using netstat to look for anything listening on port 80 doesn't reveal any competitors for port 80. Watching the 'messages' log during Apache startup doesn't show any signs to suggest that selinux is interfering.

Can anyone suggest why this might be occurring, and recommend a fix? Thanks.
Reply With Quote
  #2  
Old 17th July 2008, 09:22 PM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
try using lsof (must be root) to see if there are any offenders:
Code:
lsof -iTCP:80
the above will return any files opened by a process running on port 80. lsof has many other options, but this should show you if port 80 is being used by another process.

davidj
Reply With Quote
  #3  
Old 18th July 2008, 03:35 AM
angusm Offline
Registered User
 
Join Date: Jul 2008
Posts: 4
Hmm. That disclosed that something yum-related had seemingly stalled and was apparently holding open some connections to remote sites (probably long since dead). I killed the parent process, bounced Apache and everything is fine.

Someone out there probably understands why stale connections to external sites will stop Apache binding on a single IP, but not on three, but I'm sure I don't.

Thanks for the suggestion.
Reply With Quote
Reply

Tags
apache, fails, listening, specific, start

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - listen only on specific domain andy2008 Servers & Networking 19 8th June 2009 08:32 PM
Services say they start but aren't actually started or aren't listening afterwards ardya Using Fedora 1 13th April 2009 05:54 PM
How to start apache web service in Fedora Core 5 for specific or all users jte091805 Using Fedora 2 6th September 2007 08:27 AM
How to start a process with specific uid/gid during bootup? senthilpr_in Using Fedora 1 17th May 2007 06:04 AM
apache fails to start desmccarthy Servers & Networking 3 12th June 2005 04:36 AM


Current GMT-time: 07:06 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat