LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-16-2007, 01:28 AM   #1
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246
Blog Entries: 1

Rep: Reputation: 31
apache error (address already in use)


Hi ppl,
I have been using apache as a local server for testing my html and php scripts. It was working fine for a month but now gives following error. I know nothing about networking so plz help me. Wat could be causing this problem?

[HTML]
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(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
[/HTML]
 
Old 07-16-2007, 02:56 AM   #2
spaniel
Member
 
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48

Rep: Reputation: 15
Probably something else is running on port 80

Try the following (While apache is down)

netstat -an | grep ":80:

If this returns something like:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN

Then another webserver is already running.

Another thingie that might be wrong that you have to put the FQDN in the hosts file(/etc/hosts) (No not the nice way for you purists, i know, but it will get the job done for now). So take your fully qualified domain name (host.domain.com) and put it in the host file with the ip-address.

If it works now then there is a more nicer way, but that will require you to configure your resolv.conf correctly and that you host is in the DNS tables.
 
Old 07-16-2007, 10:53 AM   #3
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246

Original Poster
Blog Entries: 1

Rep: Reputation: 31
netstat -an | grep :80

gave the following output

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 59.94.208.110:3035 209.85.143.99:80 ESTABLISHED
tcp 0 1 59.94.208.110:3391 64.127.105.44:80 LAST_ACK
tcp 1 0 59.94.208.110:2413 205.234.175.175:80 CLOSE_WAIT
tcp 1 0 59.94.208.110:2414 205.234.175.175:80 CLOSE_WAIT
tcp 0 0 59.94.208.110:2675 72.14.235.166:80 ESTABLISHED
tcp 0 0 59.94.208.110:2677 72.14.235.166:80 ESTABLISHED
tcp 0 1 59.94.208.110:4685 64.127.105.40:80 LAST_ACK
tcp 0 1 59.94.208.110:4684 64.127.105.40:80 LAST_ACK


Does that mean another instance of apache is running?
this is so weird !!! If apache is already running, y am i getting this problem? If its not apache, how to find out what it is?

I tried to kill apache with:

sudo killall -u www-data

Then i did
apache2ctl restart

It gave more errors:

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd not running, trying to start
(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

Last edited by ciden; 07-16-2007 at 10:59 AM.
 
Old 07-16-2007, 03:45 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
do:

sudo netstat -anp | grep :80

and it will tell you the process listening
 
Old 07-16-2007, 07:19 PM   #5
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
lsof -i tcp:80

Will show you what is using tcp port 80.


To kill it try kill -9 pid-number


The reason it wont start is because there is already a instance of apache running on port 80

Quote:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

For some reason it got hung up from the sound of it.

You might also want to look at older logs at the time this happened

Last edited by fur; 07-16-2007 at 07:21 PM.
 
Old 07-17-2007, 11:35 AM   #6
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246

Original Poster
Blog Entries: 1

Rep: Reputation: 31
yes. Indeed so. I recently installed the mysql apache module and by mistake i installed the apache1 module instead of apache2 which was already installed.
I dont know y aptitude installed apache1 to fulfill the dependencies instead of throwing an error...

Since u r on debian can u tell me how 2 remove all apache1 components? I tried it 1 by 1 but it gets very confusing.
Maybe u know better.
 
  


Reply



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
Apache 2 : Address in use pyre Linux - Newbie 5 10-07-2008 10:15 PM
ip address hosting in apache justsimran Linux - General 1 04-04-2007 09:24 AM
apache from email address helpme0904 Linux - Newbie 1 04-28-2006 02:22 PM
Apache redirecting to IP address di11rod Linux - Software 6 06-03-2004 06:18 PM
apache address problem?? automicro Linux - Software 1 08-14-2003 12:43 PM

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

All times are GMT -5. The time now is 11:33 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