localhost:5000 unavailable in macOS v12 (Monterey)

macOS Monterey introduced AirPlay Receiver running on port 5000. This prevents your web server from serving on port 5000. Receiver already has the port.

You can either:

  1. turn off AirPlay Receiver, or;
  2. run the server on a different port (normally best).

Turn off AirPlay Receiver

Go to System PreferencesSharingUntick Airplay Receiver.

Enter image description here

See more details

You should be able to rerun the server now on port 5000 and get a response:

python3 -m http.server 5000

Serving HTTP on :: port 5000 (http://[::]:5000/) ...

Run the server on a different port than 5000

It’s probably a better idea to no longer use port 5000 as that’s reserved for Airplay Receiver on macOS Monterey.

Just to run the server on a different port. There isn’t any need to turn off Airplay Receiver.

python3 -m http.server 4999

or

export FLASK_APP=hello
flask run -p 4999

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)