Add the IPv6 listener once, so a restarted console starts #139

Merged
jcoffey-dev merged 1 commits from fix/listen-ipv6-once into main 2026-10-28 22:19:58 +00:00
Owner

The console image crash-loops after its container is restarted, since f9fabdd (released in 2026.10.26.2 and 27.1-rc.1):

nginx: [emerg] a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4

listen-ipv6.sh inserts listen [::]:8080; (several spaces) and skipped the insert only when it found listen [::]:8080 (one space), which never matches. On a fresh container this works. On a restart of the same container, the file still has the first line, a second one is added, and nginx won't start. Found by the installer's e2e move-server case, which stops and starts the stack: the console stayed in Restarting (1). A host reboot does the same.

  • The check accepts any number of spaces.
  • docker/listen-ipv6.test.sh (in CI) runs the script on nginx.conf with and without IPv6 and three times in a row, and expects one IPv6 listener.
  • Checked by hand in nginx-unprivileged:1.29-alpine: run, docker restart twice, still running, 0 restarts, one [::]:8080.
The console image crash-loops after its container is restarted, since f9fabdd (released in 2026.10.26.2 and 27.1-rc.1): ``` nginx: [emerg] a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4 ``` `listen-ipv6.sh` inserts `listen [::]:8080;` (several spaces) and skipped the insert only when it found `listen [::]:8080` (one space), which never matches. On a fresh container this works. On a restart of the same container, the file still has the first line, a second one is added, and nginx won't start. Found by the installer's e2e `move-server` case, which stops and starts the stack: the console stayed in `Restarting (1)`. A host reboot does the same. - The check accepts any number of spaces. - `docker/listen-ipv6.test.sh` (in CI) runs the script on `nginx.conf` with and without IPv6 and three times in a row, and expects one IPv6 listener. - Checked by hand in `nginx-unprivileged:1.29-alpine`: run, `docker restart` twice, still running, 0 restarts, one `[::]:8080`.
jcoffey-dev added 1 commit 2026-10-28 22:18:13 +00:00
Add the IPv6 listener once, so a restarted console starts
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 23s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m27s
ee96410828
listen-ipv6.sh writes "listen       [::]:8080;" and then looked for
"listen [::]:8080" with one space, so the check never matched. A new
container was fine; restarting the same one (a reboot, docker restart, or
an installer that stops and starts the stack) added a second listener,
and nginx refused the duplicate and restarted in a loop. The check now
allows any number of spaces.

docker/listen-ipv6.test.sh runs the script on nginx.conf three times and
checks for one IPv6 listener; CI runs it.

Claude-Session: https://claude.ai/code/session_01Y2F7CWRXorttf5sjSbxwpj
jcoffey-dev merged commit ad28a99e60 into main 2026-10-28 22:19:58 +00:00
jcoffey-dev deleted branch fix/listen-ipv6-once 2026-10-28 22:19:58 +00:00
jcoffey-dev referenced this issue from a commit 2026-10-28 23:12:45 +00:00
Sign in to join this conversation.