3

Apache will not start because port 80 is in use by an unknown. Netstat with various parameters does not show anything listening to port 80. How can I force port 80 to break the connection when nothing shows up as using it?

1
  • 1
    I don't know who upvoted this question for what reason.
    – ott--
    Sep 28, 2013 at 23:12

4 Answers 4

5

You can use lsof -i <Internet address> command. In your case it will be lsof -i :80 and the results will be something like below.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME 

Value of PID can be used to kill the process.

You can read further at "Find which process holds a port number"

1
  • 1
    Important: lsof must be run by root to show this information about processes of other users. Nov 7, 2013 at 9:49
1

Many thanks for the suggestion. I tried netstat and several others and finnaly found "portreporter". When all was said and done I could not find anything pointing to port 80 so I backed everything up and deleted Apache and reinstalled. It works fine now. I assume that some of the Apache software had gotten corrupt. Anyway when Apache was uninstalled port 80 was free and not in use. Installing Wamp software again allowed everything to go to work just as it should. I know it was Apache since I could still access the folders and files and databases, just could not start Apache due to port 80 in use. Thanks again!

0

Try netstat -ao

A will display all connections O will display the process id (pid)

You can also try

Telnet 127.0.0.1 80 and try GET to see if you can get a http response for further clues

3
  • 1
    nothing shows up as port 80 when I use the netstat with any parameters. However when I used telnet 127.0.0.1:80 I got the following - "Could not open connection to host on port 23, connection failed". I am still at a total loss. Any other suggestions? Thanks!
    – user253069
    Sep 12, 2013 at 21:56
  • You put a colon between 127.0.0.1 and 80. Don't put a colon. I also suggested using netstat -ao which I am not clear if you used or not. The port 23 error means your telnet used port 23 (default telnet port) and did not connect to port 80.
    – Sun
    Sep 13, 2013 at 23:00
  • 1
    Thanks again. I did try using telnet 127.0.0.1 80 it displayed nothing. I also tried netstat -ao. It did not show a port 80 anywhere. This user of port 80 seems to be using a cloaking device - Ha, Ha. Anyway it is a real phantom. If you have any other thoughts, I would be happy to hear them.
    – user253069
    Sep 17, 2013 at 0:23
0

Check what kind of services/applications you have running in the background. Process explorer can be used to identify running processes and also trace these services to their respective TCP connections.

Maybe you installed another web server before running Apache?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .