EMZETT.
Login

EADDRINUSE: Port Already in Use

In short: A program cannot open a port because it is already in use.

In more detail: Typical with Node.js or Docker (“port is already allocated”).

In Depth

Possible causes

  • Another process uses the port.
  • An old instance of the server is still running.

Solutions

  1. Find and end the process (lsof -i :3000, netstat -ano).
  2. Choose another port.
  3. Docker: stop the old container.

See also: Port, Node.js, Docker