Port Issues on Mac - Site Domain

I am one of the apparently many people having issues with Local running on their Mac’s.

I have checked nearly every community forum I can find on this topic, with none of them leading to a resolution.

I have restarted my machine and ensured there are no processes under :80 or :443. In fact, the only process running on :443 is Local. Yet somehow, I am still having port conflicts. It’s not a router port issue, as I have installed and tested this on my personal Windows machine with much better results.

If anyone has any sage wisdom outside of ‘kill process on 80 and 443’, I would greatly appreciate it. I am on a tight deadline with a requirement to use this application in the development process, and this ‘out of the box’ solution has turned into an entire days worth of time on this nightmarish problem.

What are the results from this thread.

It only shows this:

image

Is that with Local running?

Then there is something running on port 80. Try to identify what is creating that process and kill it.

That’s the confusing part.

When I go to my Acitivity Monitor and check the memory based on Ports, nothing shows.
I’ve run the command lsof -i :80, and killed the one command (that had CLOSED at the end), just to make sure. It still returns on port 80 LISTEN, even when lsof -i :80 shows no processes.

If there’s another way to check if a process is running on the port, please let me know. And thank you for your help so far.

I don’t think Activity Monitor is showing what you think it’s showing. Specifically I don’t think the port number in Activity Monitor corresponds to the TCP port number. As simple search for nginx in Activity Monitor will demonstrate this.

Just to be clear. You are saying that when you kill the process running on port 80 another process immediately shows as running on port 80?

It might be worthwhile restarting your Mac.

I just restarted. After giving it a few minutes to settle from initial boot, sudo lsof -i :80 shows me that there are two httpd commands running, with users root and _www.

I then tried to ‘sudo killall httpd’. However, the processes are immediately restarting themselves. Even killing one, then the other, in either available order does nothing.

I’ve emptied my /Library/LaunchAgents folder of launch items. Homebrew and Adobe Creative always make there way back into it, it appears.

In order to find what binaries are being used on the process, I used ‘sudo lsof -p PID | grep txt’. Most of the output httpd files are related to apatche2, so I ran ‘sudo apachectl -k stop. It’s throwing an error, "httpd: could not reliably determine the server’s fully qualified domain name, and using name-macbook.local…’

I tried a number of different unload commands I could find online, but I believe this one actually ended up working for me ‘sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist’. The others I found didn’t follow the same file structure.

Thanks for your help, @afragen. Your assistance helped give me some tools and lead me in the right direction.

1 Like

I’m glad you got this figured out. I was going to say something about LaunchDaemons and LaunchAgents but I wasn’t sure where to go after that.

sudo launchctl list will give you a listing of everything running and might be helpful to someone.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.