Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

what the heck is running on port 80?

Hi Folks --

I'm trying to get a pretty fresh install of OSX server running, but apache won't start. It has an error in the logs:

-----
make_sock: could not bind to port 80
-----

and it looks like SOMETHING is running on port 80, but there is no process name:

-----
web: root# sudo netstat -an | grep LIST | grep 80
tcp4 0 0 *.80 . LISTEN
-----

There are not other apache processes running:


-----
web: root# ps -aux | grep httpd
root 19958 0.0 -0.0 27368 448 p4 S+ 3:49PM 0:00.00 grep httpd

web: root# killall httpd
No matching processes were found
-----

And yet i still get errors when trying to start it up:


-----
Processing config directory: /private/etc/httpd/users/*.conf
[Thu May 17 15:50:56 2007] [crit] (48)Address already in use: make_sock: could not bind to port 80
-----

because something is actually running on port 80:

-----
web: root# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
-----

When i treat it like apache/try to get the version number, it dies:
-----
HEAD / HTTP 1.0

Connection closed by foreign host.
-----

so i don't think it is apache. but i have no idea what else it may be. How can i ID that service?

Any thoughts about what is going on? All ideas appreciated!


Mac Pro Ocho Mac OS X (10.4.9) Running OSX Server

Posted on May 17, 2007 5:56 PM

Reply
5 replies

May 18, 2007 10:32 AM in response to webmonk

Ah ha, thank you! I wasn't familiar with that command.

Here's what i got:
----
web:~ brooker$ sudo lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
webperfca 387 www 3u IPv4 0xaabb920 0t0 TCP *:http (LISTEN)
...
----

Web performance cache! That is it. Is it somehow grabbing port 80 before apache does?

If i kill it, it seems to restart itself. I was able to kill the process and restart apache right away. That seems to keep it from restarting.

But this seems far from an ideal situation. How is this supposed to work? Is my config mixed up somewhere (apachectl configtest: OK)?

Should i start a new post?

Thank you so much for your help. lsof is a good freind to have indeed!

Mac Pro Ocho Mac OS X (10.4.9) Running OSX Server

May 18, 2007 11:57 AM in response to webmonk

The webperfcache process sits in front of Apache, proxying connections to the server. If the request is for something in the cache it serves it without bothering Apache, providing a performance boost for certain content.

It's started automatically as part of the standard Apache installation if 'Performance cache' is enabled on any of your sites.

The solution is to disable the Performance Cache on each and every site you run.

May 18, 2007 3:39 PM in response to Camelot

Thanks for the summary. that makes sense, and sounds like a great tool.

The surprising thing here is that i had not yet set up any sites. It's a pretty fresh install.

I dumped a few files under the /lib.../webserver/doc.../ folder just to test things, but never actually used the Server Admin page to create a site (mostly because it couldn't start web services). There are no sites listed, and adding a default (*) site, i can see the performance option, but it is not enabled by default.

So i'm not sure why it was started or why it prevented apache from starting, but i will play with the config on the server admin page and see if i can figure anything out.

Thanks!

May 25, 2007 6:04 AM in response to webmonk

I don’t know why the performance cache should stop Apache from starting but it appears to be on by default - I wish it were not. You should be able to control it for individual sites from Server-admin/Web/Settings/Options

You may wish to read:
http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man8/webperfc ache.8.html

The pages I intend to move to the Xserve are all parsed and make full use of SSI and I could not convince myself that they would be compatible with the performance cache.


Xserve Mac OS X (10.4.9)

what the heck is running on port 80?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.