Port 5000 taken on macOS
- #macOS
- #Network
- #AirPlay
- #Firebase Emulators
Port 5000 taken on macOS
While trying to start my Firebase Emulators, I kept running into the error message: `Port 5000 is not open on localhost, could not start Hosting Emulator.`
Scenario:
Attempting to start Firebase emulators on macOS, I get the following error message:
Port 5000 is not open on localhost, could not start Hosting Emulator.
You can look to see what process is using the port by running the following command: lsof -i :5000
Problem:
It turns out the ControlCenter was using this port and every time I try to kill the process, it just respawns itself. Airplay turns out to be the culprit by occupying this port in Monterey for macOS.
Resolution:
Go to System Preferences → Sharing and uncheck AirPlay Receiver
This disables AirPlay Receiver. If you would like to double check if it worked, you can run the command to see if a process is still using port 5000: lsof -i :5000 You should not see any process occupying the port any longer. Go ahead and attempt to start Firebase emulators again.
References:
0 Comments
Sign in to join the conversation.