LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-08-2005, 07:25 PM   #1
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Rep: Reputation: 0
Apache Error


Hello!

I'm fairly new to Apache and to Linux. I'm trying to configure Apache to host a website. I've set up the information as best I can, but I get an error every time I try to start the httpd service. Maybe someone can define my error. Here is the error:

Starting HTTPD: (99)Cannot assign requested address: make_sock could not bind to address 172.16.1.3:80
No listening sockets available, shutting down

Any help is greatly appreciated as this is for a school project.

Nick
 
Old 04-08-2005, 07:33 PM   #2
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
Something's got that socket bound up already, to find out what it is run: "netstat -nap --inet|grep -w 80|grep -i listen" (is it possible that apache's already running when you're trying to start it?)
 
Old 04-08-2005, 08:32 PM   #3
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
I don't believe it is already running, the service has been turned off.

Just to clarify, does socket mean port?

Here is what I see:

4240/rpc.statd 0.0.0.0:32768
4359/xinetd 127.0.0.1:32769
4221/portmap 0.0.0.0:111
4549/X 0.0.0.0:6000
4344/sshd 0.0.0.0:22
4401/cupsd 127.0.0.1:631

Hope this helps since I can't copy paste. lol

Nick
 
Old 04-08-2005, 08:33 PM   #4
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
your ISP might have blocked port 80?
 
Old 04-08-2005, 08:38 PM   #5
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
We're building our own network, so we're not connected to the school network.
 
Old 04-08-2005, 08:39 PM   #6
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
Quote:
Originally posted by nickmoncrief
I don't believe it is already running, the service has been turned off.

Just to clarify, does socket mean port?

Here is what I see:

4240/rpc.statd 0.0.0.0:32768
4359/xinetd 127.0.0.1:32769
4221/portmap 0.0.0.0:111
4549/X 0.0.0.0:6000
4344/sshd 0.0.0.0:22
4401/cupsd 127.0.0.1:631

Hope this helps since I can't copy paste. lol

Nick
That was the output for the command I gave you? Weird....

Try this one "lsof -i :80"

in the first column of the output will be the process that's listening on port 80, kill it

Something's already listening on port 80, or you have apache configured to listen on a non-existant interface, I'm assuming "172.16.1.3" is the ip you're trying to get it to listen on from your first post. if thats not correct you'll need to fix it in your httpd.conf.
 
Old 04-08-2005, 08:45 PM   #7
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Tried the new command, and got nothing.

You're right, I'm trying to congure it so that when someone types in my IP address 172.16.1.3 in their address bar they bring up my webpage. Would it help if I copy pasted my HTTPD.conf file here?

Nick
 
Old 04-08-2005, 08:50 PM   #8
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
What, if anything is set as "bindaddress" in httpd.conf? also, are you certain that the ip address you gave is correct? Check the output of ifconfig eth0 (assuming you've only got one NIC and are trying to bind to it)

(if you're getting an IP from DHCP, change over to a static addy as well)

Edit ...also, just for S&G, run "apachectl configtest" to check your config files for accuracy....

Last edited by zeos; 04-08-2005 at 08:52 PM.
 
Old 04-08-2005, 08:53 PM   #9
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 172.16.1.3:80
#Listen *:80



I've already configured my IP address to be static. I'm the DHCP server on our project.

Nick

EDIT: The resut of that command was that the syntax was OK.
 
Old 04-08-2005, 08:59 PM   #10
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
one other, probably stupid, question ....you are attempting to start apache as root aren't you?

Also, what distro are you using and do you know if you have SELinux enabled?

watch the output of /var/log/messages when you attempt to start and see if anything's popping up in there that would be relavent...

Last edited by zeos; 04-08-2005 at 09:01 PM.
 
Old 04-08-2005, 09:01 PM   #11
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Indeedy, logged in as root.

This is RedHat 9 2.4.20-6

Would it matter if I wrote to the httpd.conf file using the GUI HTTPD tool and now am trying to edit it without that tool?

Thanks for trying to help, I really appreciate it.

Nick

EDIT: It only says that HTTPD service failed.

Oh by thje way, I've changed a few things since we began, and I am no longer seeing the error on the first post. All it says now is that the service failed withy no error message.

Maybe that will spark something.

Last edited by nickmoncrief; 04-08-2005 at 09:06 PM.
 
Old 04-08-2005, 09:07 PM   #12
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
Just to check, uncomment "Listen *:80" and comment out "Listen 172.16.1.3:80" and try to start .....
 
Old 04-08-2005, 09:09 PM   #13
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Something else:

Within the /var/log directory there is another directory called httpd. I went into it and into a file named error_log.

THis log says "Name or service not known: mod_unique_id: unable to find IPv4 address of "HQDHCP" Configuration failed!


HQDHCP is my host name, just so you know.,
 
Old 04-08-2005, 09:11 PM   #14
nickmoncrief
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Just to check, uncomment "Listen *:80" and comment out "Listen 172.16.1.3:80" and try to start .....
No luck.
 
Old 04-08-2005, 09:17 PM   #15
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
There's gotta be a simple explanation...it's just hard as heck going back and forth via a message board. Are you trying to run any vhosts by chance?

Also, if you can, go ahead and post your httpd.conf ...there's gotta be something amiss in there that apache's not seeing as an error, but is preventing it from starting.
 
  


Reply


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
Apache Error (Internal Server Error) dwarf007 Linux - Software 1 07-17-2005 02:16 PM
Apache Error Verbal Kint Linux - Software 5 05-23-2005 03:28 PM
Apache Error idot Linux - Software 2 03-18-2005 11:03 AM
Apache Error alimharji Linux - Software 1 07-23-2004 07:01 AM
Apache error Phaethar Linux - Software 0 12-15-2003 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration