Problem · Resolved

Port 5000 taken on macOS

AOAnonymous One· Sep 1, 20221 min read
  • #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 PreferencesSharing 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: 

  1. [Solved] Port 5000 Used by Control Center in macOS Monterey

0 Comments

Sign in to join the conversation.

Search

Jump to a page, story or project