files-healthy: nginx (Nextcloud's web frontend) can never bind :80 — Caddy already owns it, so Files stays "not ready" #529
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#529
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure
The
#183rehearsal drive went RED at the files-healthy leg (artifacts/legs.json:97-102), 39ms after thedeploy-filesleg reported green:error-context.mdconfirms the same assertion failure (expectFilesHealthy,tests/e2e/journey.droplet.spec.ts:374) and shows the Active screen (S5) rendering the founding-bar trio correctly — this is not a UI/harness timing miss, the app itself is reporting the files service as failed.Root cause (droplet's own systemd journal)
logs/droplet-journal.txtshows two NixOSswitch-to-configurationruns on the droplet. The first (15:39:55–15:40:33, adding the control-plane) succeeds cleanly. The second — the one that lands the files/Nextcloud service, matching thedeploy-filesleg's ~231s duration and ending exactly at 15:45:00 — brings upnginx.servicefor the first time, and it never binds successfully:nginx retries twice more (restart counter 1, then a client-requested restart during the second switch attempt) and fails every single time with the identical
Address already in useon both0.0.0.0:80and[::]:80, right up through 15:45:01 — after the NixOS switch itself is reported "finished" (clan-switch-gateway-a8bd3105.service: Deactivated successfully, 15:45:00). So the activation completes, but nginx is left permanently down.The only other process holding port 80 on this host is Caddy, the community's single public front door, started earlier and never restarted or crashed:
Meanwhile
nextcloud-setup.service,php-fpm, and the brand-kitocccalls all completed successfully (Nextcloud was successfully installed,[NOTICE] fpm is running, pid 8541,[NOTICE] ready to handle connections) — the PHP application layer is fine. It's the HTTP frontend in front of PHP-FPM (the NixOSservices.nginxvhost the Nextcloud module wires up) that's dead, because it's fighting Caddy for:80. With nginx down, nothing servesfiles.rehearsal.idss.nzon the expected path, so the control-plane's own Nextcloud health probe correctly reports the service as not ready, and the Active screen surfaces exactly that: "Files & documents is not serving — Nextcloud reports it is not ready."Suspected layer
Product — the gateway's NixOS module composition. Enabling the files/Nextcloud service adds a
nginx.servicethat listens on0.0.0.0:80/[::]:80unconditionally, without accounting for Caddy already owning port 80 as the community's sole front door. This isn't a flaky timing issue or a harness gap — the port conflict is deterministic and total (0/3 bind attempts succeeded), and it's an infra-layer regression, not a Nextcloud application defect.What plugging it needs
Someone with access to the gateway's Nix module (the composition that turns on
services.nginxfor the files/Nextcloud role) needs to either::80/[::]:80— bind it to localhost or a private port instead, with Caddy reverse-proxying to it (matching how the rest of the fleet's services are fronted), orfiles.<apex>traffic straight to PHP-FPM without an intermediate nginx, and disable/remove the module's nginx vhost for this role entirely.Either fix is scoped and actionable without a human ruling on product behavior — the invariant ("Caddy is the one public :80 listener") is already established elsewhere in this journal (Caddy started once at boot, never conflicted, never restarted).
Not the known frontier
This is not the known own-VPS pairing frontier (
legs.json's skip-reason class where pairing never flips) —pair(19ms),mesh(13ms), andpublic-entry(14ms) all went green with no skip markers inlegs.json. This is a new, distinct RED atfiles-healthy, three legs past pairing.Absent evidence
All
logs/guest-*.logandlogs/qemu.logfiles are empty/error stubs (Failed to connect to bus,No such file or directory,ps -C qemu-system-x86_64finding nothing) — expected for adrive-dropletrun, which drives a real DigitalOcean droplet rather than a local qemu guest, so these collectors have nothing to gather.artifacts/journey.jsonhasrows: null, fault: null— the founding-rows capture wasn't populated for this run (or founding hadn't reached a capturable point when it snapshotted); it adds nothing beyondlogs/founding-state.log, which independently confirms founding completed through hand-off before the drive continued into the files leg.drive
20260814T153243Zred atfiles-healthy:[data-field="service-files"] is absent but services-health is present — a failure is standing that named a different service: Files & documentsFAILEDFiles & documents is not serving — Nextcloud reevidence:
test-results/…/20260814T153243Z/on matou-workstation (legs.json, droplet-journal.txt, trace)⚠️ TRAP for the fix — verified live before you pick the port: the natural fix (apply
FilesConfig.LoopbackPort = NextcloudLoopbackPorton the own-VPS co-host, as the private path does) walks straight into a SECOND collision.NextcloudLoopbackPort = 8081(internal/clan/files.go:88) — and on the own-VPS gateway acme-dns's HTTP API already owns 127.0.0.1:8081, from this very drive's journal:The private path co-hosts happily on 8081 only because it runs no acme-dns (guest CA, no ACME). Set it to 8081 here and nginx dies EADDRINUSE on 8081 instead of 80 — same red, one drive later.
So the fix is two-part:
NextcloudLoopbackPortoff 8081 to an unclaimed loopback port, updatingNextcloudLoopbackTargetwith it (they're deliberately adjacent so they can't drift). Known claims on the own-VPS gateway to avoid: 8080 (control plane), 8081 (acme-dns API), 8443 (kanidm loopback). CheckgatewayFleetPorts()(vmguest.go) and the other service renders for the rest before choosing, and leave a comment at the constant naming the neighbours so the next port lands clean. Private-path pins re-pin with the constant — deployments are ephemeral, no migration concern.Evidence for part 1 from the same journal: nginx bound its DEFAULT
0.0.0.0:80/[::]:80(not a loopback port) → EADDRINUSE against Caddy → nginx.service failed — i.e. the override was never rendered on this path.swarm-claim host=elitebook-distributed-server-03 run=6117
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #529 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope