Error fix

How to fix “EADDRINUSE — port already in use

Something else is already listening on that TCP port—another dev server or a zombie process.

Updated Apr 20, 2026

Tools that help with this

Fastest fix

Start here first. Step 1 fixes most cases—then work down the list.

  1. Identify PID with netstat/lsof/ss and stop the process or kill it safely.
  2. Change your app’s port via env (PORT=3001) or framework flag.
  3. On Windows, resolve System PID 4 vs HTTP.sys URLACL conflicts if applicable.

What this means

The OS refused to bind because only one listener can own a given port on an interface (for typical servers).

Common causes

  • Duplicate dev servers

    Previous process not killed or IDE auto-started a second server.

  • System services

    Another app (IIS, SQL, Docker) already claimed the port.

Step-by-step fix

  1. Free or change the port

    1. Identify PID with netstat/lsof/ss and stop the process or kill it safely.
    2. Change your app’s port via env (PORT=3001) or framework flag.
    3. On Windows, resolve System PID 4 vs HTTP.sys URLACL conflicts if applicable.

FAQ

Docker port already allocated?
Stop the conflicting container or map host ports to a free value.
Port works once then fails?
TIME_WAIT can briefly hold ports—use SO_REUSEADDR in servers you control.
macOS AirPlay using 5000?
Pick another port or disable the service using that port.

Still stuck? Try these related fixes next.

Edit your error

Tweak the message and run again—we'll match an existing fix or generate a new page.

Original error message
EADDRINUSE: address already in use :::3000
Fix another errorHTTP status codesURL status checkerRedirect checkerAll tools