Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th January 2008, 23:05
cfspence cfspence is offline
Junior Member
 
Join Date: Oct 2007
Location: West Central, Illinois, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error starting Apache (httpd start fails)

Advance apologies for the utter novice question.

In attempting to fix a slow server problem, I have somehow managed to "break" Apache. It will not now start (even when the system reboots).

Here is the error message:
Quote:
# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
It appears that port 80 is busy and not available for listening. How do I correct this?

Thanks in advance for your help.
--Clay
Reply With Quote
Sponsored Links
  #2  
Old 25th January 2008, 23:55
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

Have you checked with netstat to see what is holding the port open ?
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 26th January 2008, 02:59
unclecameron unclecameron is offline
Senior Member
 
Join Date: Apr 2006
Posts: 115
Thanks: 2
Thanked 8 Times in 7 Posts
Default

you could also run Top or better yet install Htop and it will show you what process is hanging, then run

kill PID#

then start apache
Reply With Quote
  #4  
Old 26th January 2008, 20:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Which distribution are you using, and how did you install Apache? Did you do any changes to the Apache configuration?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th January 2008, 06:38
cfspence cfspence is offline
Junior Member
 
Join Date: Oct 2007
Location: West Central, Illinois, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. Here is (some) of the information you requested.

I tried reading the man pages for netstat and I'm still not sure I have issued the command with the correct options - I tried several. It's still not obvious to me what is holding port 80 open. I would be happy to post some of the output if requested. There is no output (other than the column heading) if I simply issue netstat without options.

I have not installed HTop but did try running top. It is not obvious to me that there is a process that is hanging - how could I tell?

I installed Apache during the fc6 install (essentially following the "Installing a LAMP System with Fedora Core 6" how-to on how-to-forge). I may have may configuration changes but I don't think so (sorry to be so vague). I could post the httpd.conf file if that would be helpful. Here is the result of httpd -V:
Code:
[root@gnlewis log]# /usr/sbin/httpd -V
Server version: Apache/2.2.6 (Unix)
Server built:   Sep 18 2007 11:26:13
Server's Module Magic Number: 20051115:5
Server loaded:  APR 1.2.7, APR-Util 1.2.8
Compiled using: APR 1.2.7, APR-Util 1.2.8
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="/usr/sbin/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"
Thanks again for your help.
Reply With Quote
  #6  
Old 28th January 2008, 08:23
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

You can call netstat like this
Code:
netstat -ntlp
You can check your apache config like this
Code:
httpd -t
If you dont find the problem then maybe try strace to find out why apache is hanging.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

Thread Tools
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 / httpd restart / startup failed without errors Aldert Server Operation 11 30th January 2008 18:11
"Too many open files in system" problems Berry Installation/Configuration 3 10th November 2007 22:58
MaxClients set to appropriate level, but ISPconfig is crashing from it (I think) bpmee Server Operation 6 11th January 2007 20:29
Virtual Users and Domains with Postfix ... (FC5) remstedt HOWTO-Related Questions 23 13th December 2006 14:56
Apache won't Start httpd EnDLeSs HOWTO-Related Questions 8 11th June 2006 02:05


All times are GMT +2. The time now is 03:52.


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