Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: listen EADDRINUSE: address already in use :::3000 #356

Closed
sam1310 opened this issue Jun 29, 2023 · 1 comment
Closed

ERROR: listen EADDRINUSE: address already in use :::3000 #356

sam1310 opened this issue Jun 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sam1310
Copy link

sam1310 commented Jun 29, 2023

I didn't get a notification for today's free game, and noticed the following error in the docker log:

[2023-06-30 00:00:02.710 +1000] ERROR: listen EADDRINUSE: address already in use :::3000
    err: {
      "type": "Error",
      "message": "listen EADDRINUSE: address already in use :::3000",
      "stack":
          Error: listen EADDRINUSE: address already in use :::3000
              at Server.setupListenHandle [as _listen2] (node:net:1740:16)
              at listenInCluster (node:net:1788:12)
              at Server.listen (node:net:1876:7)
              at createServer (/usr/app/src/common/server.ts:31:19)
              at main (/usr/app/src/index.ts:75:38)
              at processTicksAndRejections (node:internal/process/task_queues:95:5)
      "code": "EADDRINUSE",
      "errno": -98,
      "syscall": "listen",
      "address": "::",
      "port": 3000
    }

No other container is using this port, and restarting the container fixed it.

@sam1310 sam1310 added the bug Something isn't working label Jun 29, 2023
@claabs
Copy link
Owner

claabs commented Jul 9, 2023

I've been thinking over this and I can't come up with a solid reason that this would happen. My guess is that a previous run was still going when a second scheduled one started, but the container uses file locks to prevent that from happening.

If this happens to anyone again, I'd like more log context to understand what happened before the error.

@claabs claabs closed this as completed in 89c8ea4 Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants