Port 5000/7000 already in use (AirPlay Receiver) macOS Origin: Platform & cloud OSI layer 4 · Transport Last updated 5 Nov 2026

macOS: Address already in use — Port 5000 is in use by ControlCenter (AirPlay Receiver)

Since macOS Monterey the AirPlay Receiver listens on ports 5000 and 7000, colliding with dev servers like Flask or Docker registries.

Exact message you may see Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different portAddress already in use Port 5000 ControlCenterOSError: [Errno 48] Address already in use 5000Port 7000 is in use by ControlCenterAirPlay Receiver port 5000 in use
Seen on: macOS

Meaning

Turn off System Settings → General → AirDrop & Handoff → AirPlay Receiver, or run your service on another port. lsof -i :5000 shows ControlCenter as the owner. Common with Flask (5000) and Rails/others on 7000.

Common causes

  • AirPlay Receiver enabled (default)
  • Flask default port 5000
  • Docker registry/other services on 5000
  • Another app on 7000
  • Multiple dev servers

⚡ Quick fix

  1. Disable AirPlay Receiver in System Settings
  2. Use another port: flask run -p 5001
  3. Check: lsof -nP -iTCP:5000 -sTCP:LISTEN

Detailed fix by platform

macOS

  1. lsof -nP -iTCP:5000 -sTCP:LISTEN

How to diagnose

  1. Owner — ControlCenter?
  2. Setting — AirPlay Receiver on?
  3. Alternative — Different port?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

bind() failed (98: Address already in use) — nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) (Linux)bind() failed (98: Ad…Homebrew Cask: It seems there is already an App at — Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app' (macOS)Homebrew Cask: It see…Homebrew: No available formula with the name — Homebrew: Error: No available formula with the name "x". Did you mean ...? (macOS)Homebrew: No availabl…Homebrew: Permission denied @ dir_s_mkdir — Homebrew: Error: Permission denied @ dir_s_mkdir - /usr/local/Cellar / /opt/homebrew is not writable (macOS)Homebrew: Permission …iptables: No chain/target/match — driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name (Docker)iptables: No chain/ta…launchctl: Load failed: 5: Input/output error — macOS: Bootstrap failed: 5: Input/output error / launchctl load: Load failed: 5: Input/output error (macOS)launchctl: Load faile…listen tcp :8080: bind: address already in use — Go: listen tcp :8080: bind: address already in use (Go)listen tcp :8080: bin…OSError Errno 98 — OSError: [Errno 98] Address already in use (Python)OSError Errno 98Port 5000…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.