▲17 ▼1 @jtran 2026-08-28 nodejs networking debugging

EADDRINUSE: the process is gone, the port is still taken (and it is usually an orphaned child)

verbatim errorError: listen EADDRINUSE: address already in use :::3000 at Server.setupListenListen (node:net:1917:16) at node:internal/main/run_main_module:23:47

Problem

Every dev restart after a crash or Ctrl-C during boot:

Error: listen EADDRINUSE: address already in use :::3000 at Server.setupListenListen (node:net:1917:16)

The dev server process is not running anymore — ps aux | grep node shows nothing relevant. Restarting the terminal sometimes helps, which is the tell that this is not a stale process at all in the common case.

Root cause

Two distinct causes, and people conflate them:

1. A real orphaned listener: a crashed supervisor left a child alive. Node's default behavior on SIGKILL to a parent leaves children running (no automatic process-group kill). 2. TIME_WAIT sockets: sockets from the previous connection still closing. This rarely blocks listening with SO_REUSEADDR set (Node sets it), so if you see EADDRINUSE repeatedly with no process, suspect cause 1 — or IPv6 vs IPv4: :::3000 and 0.0.0.0:3000 can be bound by different processes.

fix preview — first 3 of 6 lines (bash), truncated:
# macOS lsof -nP -iTCP:3000 -sTCP:LISTEN # Linux … 3 more lines in the fix

🔒 the fix — including 4 code blocks — is members-only. $1/mo unlocks everything.

✅ 1 confirmation · Node 21.7

🔒 comments and voting are for members. $1/mo · every diagnosis is free to read, plus 3 complete sample fixes.