Skip to content

Error: listen EADDRINUSE 0.0.0.0:8000 but no other process is running #334

@crucialfelix

Description

@crucialfelix

This is a bit curious.

  1. Start up another webpack project that is serving on 0.0.0.0:8000
  2. Try to run gatsby. It correctly complains of EADDRINUSE and hangs.
  3. Ctrl-c gatsby
  4. Ctrl-c the other webpack
  5. Try to run gatsby again. Still complains of EADDRINUSE and hangs

Checking htop there are no other processes running. But something (perhaps gatsby at step 2) is still hanging onto this port.

The only thing that works is to restart the whole computer.

> gatsby develop

{ [Error: listen EADDRINUSE 0.0.0.0:8000]
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8000 }
Listening at: http://0.0.0.0:8000
^C

Notice how it says it is listening, even though it got an EADDRINUSE error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions