localhost:5000 unavailable in macOS v12 (Monterey)

We Are Going To Discuss About localhost:5000 unavailable in macOS v12 (Monterey). So lets Start this Python Article.

localhost:5000 unavailable in macOS v12 (Monterey)

  1. How to solve 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:
    turn off AirPlay Receiver, or;
    run the server on a different port (normally best).
    Turn off AirPlay Receiver
    Go to System PreferencesSharingUntick Airplay Receiver.

    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

  2. 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:
    turn off AirPlay Receiver, or;
    run the server on a different port (normally best).
    Turn off AirPlay Receiver
    Go to System PreferencesSharingUntick Airplay Receiver.

    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

Solution 1

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

Original Author Nick Of This Content

Solution 2

I had the same issue I upgraded the mac os from big sur to Monterey , i had a node API that runs on port 5000 which was now failing due to the fact that the API was trying to use the port which was being used with an operating feature which was airplay so as solution i used turn off air play feature then my app starting working.

Original Author kelvin nyadzayo Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment