Nono.MA

LAST UPDATED NOVEMBER 17, 2021

As is port 3000, port 5000 is commonly used to serve local development servers. When updating to the latest macOS operating system, I noticed my React development server, which I'm serving with React create-serve was using a port other than 5000, because it was already in use. (You may find a message along the lines of Port 5000 already in use.)

By running lsof -i :5000, I found out the process using the port was named ControlCenter, which is a native macOS application. If this is happening to you, even if you use brute force (and kill) the application, it will restart itself. In my laptop, lsof -i :5000 returns that Control Center is being used by process id 433. I could do killall -p 433, but macOS keeps restarting the process.

The process running on this port turns out to be an AirPlay server. You can deactivate it in System Preferences › Sharing, and unchecking AirPlay Receiver to release port 5000.

Want to see older publications? Visit the archive.

Listen to Getting Simple .