Why is Control Center on Monterey listening on ports?

Why is Control Center on Monterey listening to port 5000 and port 7000? I have used these ports for years for local development, but now find them in use by Control Center. Is this worth filling a Feedback about?

  • Definitely worth filling feedback about.. this is going to break a lot of Flask apps that listen on 5000 by default. Not sure why apple chose such a popular port.

  • Agreed... It has broken a lot of my development configurations as well.

  • Just found out about this, while running the docker example-voting-app and failing because port 5000 is used, so I run: lsof -nP +c 15 | grep LISTEN

    and there it was ControlCenter with ports 5000 and 7000 being used.

Add a Comment

Accepted Answer

This is apparently due to the new AirPlay functionality. Control Center stops listening to those ports when I turn off “AirPlay Receiver” in the “Sharing” System Preference:

  • Thank goodness this seems to fix the issues I was having.

  • This realy helped me, I was trying to kill the process running on port 5000 but it was keeping restarting it self. But after unchecking the AirPlay Reciever checkbox now it is working as expected.

  • So glad I came here -- thought I was going crazy, nothing was working!

Answers

This is apparently due to the new AirPlay functionality. Control Center stops listening to those ports when I turn off “AirPlay Receiver” in the “Sharing” System Preference:

  • Thank goodness this seems to fix the issues I was having.

  • This realy helped me, I was trying to kill the process running on port 5000 but it was keeping restarting it self. But after unchecking the AirPlay Reciever checkbox now it is working as expected.

  • So glad I came here -- thought I was going crazy, nothing was working!

The good news is that this appears to fix issues with the HomePod Mini's connectivity and voice delay issues when using the speaker for Mac Mini.

Is it possible to configure the port that the AirPlay Receiver listens on?

  • While you're running your application on 5000, you can go back in System Preferences and turn AirPlay Receiver back on. For me it changed it from 5000 to 49936. Now you should be able to just keep it on.

  • You got it right bro. thank you.

Add a Comment

Why port 5000? This is a very common web development port. Just another layer on top of the things that apple does to make web development as difficult as possible.

  • This is ridiculous. And i doubt us users can change the ports since it's shipped with Monterey. Might downgrade unless there's a fix for this

  • For sure it sucks, but it's not something worth downgrading for. Just turn off AirPlay receiver in system preferences -> sharing, or change the port you use for your development server. It shouldn't be difficult.

Add a Comment

The Remote Audio Output Protocol, AKA AirTunes, AKA AirPlay, has been using port 5000 since the year 2004. This is nothing new. All AirPlay receivers including AirPort Express and Apple TV use port 5000. If you've ever used Airfoil on your Mac (Airfoil Speakers was released in 2008), that also uses 5000 for the same reason. AirPlay receiving is new to macOS Monterey, but AirPlay itself is very old, predating Flask and these other web development environments. No, Apple is not trying to make web development difficult.

It seems that port number 5000 was never officially registered with IANA, and has many more conflicts. Can we kindly ask Apple to register their service ports and use IANA assigned ports in the future? https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Post not yet marked as solved Up vote reply of Miga Down vote reply of Miga