🐛 Bug Report: IPv6 only HOST #295

Closed
opened 2025-10-07 00:09:17 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @q-b on GitHub.

Reproduction steps

When setting the HOST env var to [::] nodejs fails:

node:events:496
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND [::]
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
Emitted 'error' event on Server instance at:
    at GetAddrInfoReqWrap.callback (node:net:2198:12)
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:17) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '[::]'
}

Node.js v22.14.0

When setting it to :: (no brackets) it seems to be happy (I did not test the service) but Caddy complains:

2025/03/14 12:36:27 listen tcp: address :::8020: too many colons in address

Expected behavior

Actual Behavior

Version and Environment

latest v0.40.0 sha256:17079de410ddfccfe2d33b423cad76cb14b2757b77209ffe715aa33f0de68d97

Log Output

No response

Originally created by @q-b on GitHub. ### Reproduction steps When setting the `HOST` env var to `[::]` nodejs fails: ``` node:events:496 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND [::] at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) Emitted 'error' event on Server instance at: at GetAddrInfoReqWrap.callback (node:net:2198:12) at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:17) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: '[::]' } Node.js v22.14.0 ``` When setting it to `::` (no brackets) it seems to be happy (I did not test the service) but Caddy complains: ``` 2025/03/14 12:36:27 listen tcp: address :::8020: too many colons in address ``` ### Expected behavior - ### Actual Behavior - ### Version and Environment latest v0.40.0 sha256:17079de410ddfccfe2d33b423cad76cb14b2757b77209ffe715aa33f0de68d97 ### Log Output _No response_
OVERLORD added the bug label 2025-10-07 00:09:17 +03:00
Author
Owner

@stonith404 commented on GitHub:

What's the reason you're trying to change the HOST inside the Docker container?

@stonith404 commented on GitHub: What's the reason you're trying to change the HOST inside the Docker container?
Author
Owner

@kmendell commented on GitHub:

If you try setting it with quotes around like this does it work? HOST="::"

@kmendell commented on GitHub: If you try setting it with quotes around like this does it work? `HOST="::"`
Author
Owner

@stonith404 commented on GitHub:

It's not really recommended to change these environment variables inside the Docker container. If you really want to change such things I would recommend you to use the standalone installation or build your own Docker image.

@stonith404 commented on GitHub: It's not really recommended to change these environment variables inside the Docker container. If you really want to change such things I would recommend you to use the standalone installation or build your own Docker image.
Author
Owner

@q-b commented on GitHub:

I'm trying to rely only on IPv6. Not a strong requirement but it helps me to get some habits and uncover some bugs.

@q-b commented on GitHub: I'm trying to rely only on IPv6. Not a strong requirement but it helps me to get some habits and uncover some bugs.
Author
Owner

@q-b commented on GitHub:

It does not.

@q-b commented on GitHub: It does not.
Author
Owner

@craigcabrey commented on GitHub:

@q-b I initially had the same problem. But Caddy listens on IPv6 & IPv4 by default, so make sure you're accessing Caddy on port 80, not the application on port 3000.

@craigcabrey commented on GitHub: @q-b I initially had the same problem. But Caddy listens on IPv6 & IPv4 by default, so make sure you're accessing Caddy on port 80, not the application on port 3000.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#295