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.
- Identify PID with netstat/lsof/ss and stop the process or kill it safely.
- Change your app’s port via env (PORT=3001) or framework flag.
- 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
Free or change the port
- Identify PID with netstat/lsof/ss and stop the process or kill it safely.
- Change your app’s port via env (PORT=3001) or framework flag.
- On Windows, resolve System PID 4 vs HTTP.sys URLACL conflicts if applicable.
Related
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.
Fix related issues
Still stuck? Try these related fixes next.
- Docker: no space left on deviceThe daemon or image layers filled the disk—prune images, volumes, or expand the host disk.
- Redis connection refusedRedis isn’t running or you’re pointing at the wrong host/port in this environment.
- Stripe invalid API keyThe key is wrong, revoked, or for a different mode (test vs live).
- SQLite SQLITE_BUSYConcurrent writers or long transactions held the lock—common in dev with hot reload.
- MongoDB server selection timeoutThe driver could not pick a server in time—replica set issues, DNS, or firewall rules.
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
