• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 965
  • Last Modified:

Error when running Apache

Hi,

I think I've installed PHP and Apache correctly, but when I run Apache I ge the following error message:

Only one usage of each socked address is normally permitted. make_socket could not bind to address 0.0.0.0.80
no listing sockets available. Shutting down. Unable to open logs.

How do I get Apache to run correctly?


Thanks.

Kara
0
kara334
Asked:
kara334
1 Solution
 
hernst42Commented:
Are you sure there is no other programm/apache is running that also uses port 80
to see if there is a process running do a:
netstat -an | grep 80
If there is another process a line like
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
will be printed.
0
 
kara334Author Commented:
Thank you for trying to help, but I'm new to all this "port" stuff. Could you please explain what you just said in English? :)

Thanks.
0
 
hernst42Commented:
Which operating system are you using, do you have root-priveliges on that machine?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
kara334Author Commented:
I'm using Windows XP. I don't know what root-priveliges are.
0
 
hernst42Commented:
Open a command-shell (start -> Execute Command to run cmd.exe)
After you that shell typ
netstat -an
the you will see which port are use. if there is already a webserver running (like IIS) a line like
  TCP 0.0.0.0:80   .... LISTENING

will be shown. So to start apache you need to shutdown the other webserver that is running.
0
 
kara334Author Commented:
Yes, I got that result. I think the other webserver is for ASP.net. How do I shut it down?

Thanks
0
 
hernst42Commented:
from the command-shell use
net stop iisadmin

To make that permanent got to the administration panel -> services and disable the autostart of WWW-publishing and IIS-admin
0
 
kara334Author Commented:
I couldn't find either of those under Services. And I actually uninstalled WebMatrix because I don't think I'm going to need it. But something is still blocking Port 80. I saw something under Services that said WebClient. Sounds important. Could that be it? What else could it be?

Thanks.
0
 
TheClickMasterCommented:
To see what program is blocking your port 80 do this:

1) Start->Execute->cmd.exe

2) Type: netstat -ano

3) Now there will be a column called PID where you see the process ID of all the programs

4) Take note of the PID of the program that listens on port 80

5) Type: tasklist /FI "PID eq ?"  but replace ? by the PID

6) The name of the program or service that uses port 80 will be displayed

0
 
kara334Author Commented:
Thank you ClickMaster.

I did what you said and came up with "tasklist." But a search found no tasklist in the computer. Do I need to turn off "task monitor" under Services, or is tasklist something else?

0
 
Richard QuadlingSenior Software DeverloperCommented:
tasklist.exe is in C:\WINDOWS\SYSTEM32 (On my Win XP Pro SP2).

How about this idea.

1 - Load up a browser.

2 - enter an address of localhost or 127.0.0.1

If you get ANYTHING other than the browser saying nothing could be found, you are already running a webserver of some sort.

If you get something but not really sure what, try...

1 - Load a command prompt.

2 - Type: telnet

3 - In telnet, type: SET LOCALECHO

4 - In telnet, type: open 127.0.0.1 80

5 - In telnet, type: GET /[CR][CR]

6 - That is GET / followed by 2 carriage returns/enters.

You may need to scroll to the top of the window (if you have no scroll bars, alter the properties of the CMD window by increasing the Screen Buffer Size in Layout - you will need to rerun this to see the top if you could not scroll up to see the top).

I get ...

HTTP/1.1 200 OK
Date: Tue, 21 Sep 2004 07:28:58 GMT
Server: SAMBAR
Connection: close
Content-type: text/html

I am running Sambar Server.

You may get something else for Server (if you get anything at all!).

Richard.
0
 
ahoffmannCommented:
>  I'm using Windows XP
not shure for XP, but most other M$ versions bind IIS (or whetever they think is related) to 0.0.0.0:80 by default.
And obviously there is no GUI to change that (does anybody really need that?-)

here is a workaround (working on w2k):
cd C:\Inetpub\AdminScripts
cscript adsutil.vbs set w3svc/disablesocketpooling true
# then setting an IP in GUI works
0
 
kara334Author Commented:
Hi,

I know it's been awhile....busy with my day job and such. I tried what RQuadling suggested and got "could not open connection to the host, on port 23"

Also, I don't have a tasklist.exe in my System 32 folder.

Does anyone have any idea what could be blocking my Apache server?


Thanks.

Kara
0
 
hernst42Commented:
Download tcpview from http://www.sysinternals.com/ntw2k/source/tcpview.shtml

that will show you which ports are opend by which programm. So look which programm has opened the http-port in the column "Local Adress"

e.g. inetinfo.exe is the IIS-Server
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now