LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-07-2006, 09:05 AM   #1
pyre
Member
 
Registered: Nov 2003
Distribution: Redhat linux 9, Fedra Core 1, Gentoo, Debian (woody), Mandrake 9.2
Posts: 75

Rep: Reputation: 15
Question Apache 2 : Address in use


I have apache 2.0.55 installed on mandriva 2006.

when i run './apachectl start' I get this error:

(98)Address already in use: make_sock: could not bind to address 192.168.1.101:8080
no listening sockets available, shutting down.
Unable to open logs

so 192.168.1.102 is the specific machine running the server, 8080 is the port, using 80 gives me the same error. also, i tried: 'service httpd restart' this looks successful saying all is [OK], but gets me nowhere. any help would be great. thanks in advance.
 
Old 04-07-2006, 11:45 AM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
netstat -lnp | grep :80
This command should return the name of the running program that hsa port 80 or 8080 open as well as it's process ID. Then you will at least know what is bound to those ports.

You don't by chance have both apache 1.3 and apache 2.x installed on your machine do you ? possibly apache 1.3 is running and that why apache2 can't start..

You can also look to the running processess to see if you see apache, apache2, or httpd running

ps -aux | grep httpd
ps -aux | grep apache


maybe try the following to check versions..
httpd -v
apachectl -v


First trick is to find out what is bound to those ports so you can move forward..
 
Old 04-08-2006, 11:24 PM   #3
pyre
Member
 
Registered: Nov 2003
Distribution: Redhat linux 9, Fedra Core 1, Gentoo, Debian (woody), Mandrake 9.2
Posts: 75

Original Poster
Rep: Reputation: 15
alright, ran netstat -lnp | grep :80

output:
tcp 0 0.0.0.0:80 0.0.0.0:* LISTEN 4766/httpd



soooo, what the hell does that mean? httpd is listening on 0.0.0.0? is httpd the same as apache?
thanks again for the help!
 
Old 04-08-2006, 11:50 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,060

Rep: Reputation: 295Reputation: 295Reputation: 295
Generally yes, although there are other httpd programs httpd is the Apache2 program. You could do a ps aux and look for process 4766 to see exactly what it is, or just kill it.
 
Old 04-09-2006, 07:53 AM   #5
pyre
Member
 
Registered: Nov 2003
Distribution: Redhat linux 9, Fedra Core 1, Gentoo, Debian (woody), Mandrake 9.2
Posts: 75

Original Poster
Rep: Reputation: 15
alright, i ran ps -aux, i found 4766, it said /usr/sbin was the command. i killed it and it freed up a load of processes that were "apache2". in the clear now right? nope. i ran 'apachectl start' but i get a similar error:

(99)Cannot assign requested address: make_sock: could not bind to address to 192.168.1.101:80
no listening sockets available, shutting down
Unabke to open logs

crap? thanks for the help so far,
 
Old 10-07-2008, 10:15 PM   #6
fedoraDrew
LQ Newbie
 
Registered: Oct 2008
Posts: 10

Rep: Reputation: 0
Pyre, I'm having the same problem, except my box is not showing any other process using that port or IP.

What are the lines in your httpd.conf file for the following:

Listen
ServerName

It used to work fine locally for me when I specified a host name in the Listen part, but remote machines would get nothing back. But as soon as I replaced the host.domain.com with an IP address, apache started barfing when I try to start it. This is the configuration that worked locally for me:

Code:
Listen host.domain.com:80
#SeverName  <-- left commented out

Last edited by fedoraDrew; 10-07-2008 at 10:18 PM. Reason: clarify behavior of my config
 
  


Reply

Tags
apache2, httpdconf


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
IP address not resloved in Apache raghavendra Linux - Networking 5 03-20-2005 10:07 AM
Apache 2 Server - Can't access it via ip address from inside LAN Robstro Linux - Networking 1 06-30-2004 01:50 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
About Apache, if i want to have page name before IP address thep Linux - Newbie 1 04-15-2001 10:59 PM


All times are GMT -5. The time now is 07:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration