• 5

enter image description here
In the above picture is my console output which occurs when I run

sudo /usr/sbin/apachectl restart

the console doesn't have any messages of syntax errors or anything when I manually start and stop apache. So how do I debug this?

EDIT: list of things using ports

$ sudo lsof -i:80
httpd   734 root    5u  IPv6 0xf..0      0t0  TCP *:http (LISTEN)
httpd   736 _www    5u  IPv6 0xf..0      0t0  TCP *:http (LISTEN)
httpd   774 root    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)
httpd   777 _www    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)
httpd   822 _www    4u  IPv4 0xf..0      0t0  TCP *:http (LISTEN)

it's the exact some for -i:443, too. Why are there so many httpds? shouldn't there just be the one? (for each IP version, i guess)

when browsing to my server's IP address in (Your favorite web browser), It just says Internal Server Error.

And then the console on the server says "nstat_lookup_entry failed 2" =\

Obviously another program is already running on your MAC. Best guess would be Skype if you do not have any other server installed. It used to use those two ports.

Maybe easier - try this at the terminal as well to see what is listening:

sudo lsof -n -i4TCP:80 | grep LISTEN
  • 0
Reply Report

From your screenshot it seems the failing operation is trying to bind to the IPv6 equivalent of, i.e. [::]. It also seems that binding to the IPv4 "address" succeeds. So after starting your Rails app check the output of netstat -64tulpen (or the appropriate equivalent on OS X) and see if it really isn't listening on the desired ports. Also try to find out what is using IPv6, bound to [::]:80 and [::]:443, and why.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags