own-VPS sign-in ceremony races Caddy's acme-dns-gated cold start — ERR_CONNECTION_REFUSED opening id.<apex> (#498 follow-on) #499
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#499
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
Drive
20260813T015909Zreds at thesign-inleg, 3 minutes after commit3448657(#498) landed and 9 minutes after this exact leg was first exercised live. #498's fix (moving the own-VPS ceremony window to the PUBLIC IdP doorhttps://id.<apex>/ui/reset) is working as designed — but it exposes a pre-existing, un-gated race: nothing waits for the gateway's Caddy (which frontsid.<apex>) to actually be listening before the app opens the ceremony window on it.(
artifacts/journey.droplet-.../error-context.md:14-26,tests/e2e/journey.droplet.spec.ts:316, default 30s Playwright timeout, no explicit budget).The real failure is upstream of that assertion —
helper.log:same text surfaces in the app's own error banner (
error-context.md:40).Evidence chain
logs/droplet-journal.txt:1464-1483— thecontrol-planedeploy row (the first activation offront-door.nix/acme-dns.nixon this box, own-VPS address chosen) completes and the founding orchestrator opens hand-off ~4.4s later (artifacts/legs.json—control-plane20122ms,finish4432ms).logs/droplet-journal.txt:842-852—acme-dns[991]logsStarting DNS listenerat02:04:53but never logs starting its HTTP API listener (127.0.0.1:8081) anywhere in the captured journal.logs/droplet-journal.txt:814onward —acme-dns-register-startretriescurl -fsS $api/healthonce a second (its own documented 300×1s cold-boot budget,docs/GOTCHAS.md#15 / issue #431, mirrored in the generatedstate/clan-config/machines/gateway/acme-dns.nix'sacme-dns-registerscript) and is still failing at02:06:27(94 consecutivecurl: (7) Failed to connect to 127.0.0.1 port 8081lines), i.e. >90s in, well inside its own budget but nowhere near done.systemd.services.caddyin the same generatedacme-dns.nixisafter/requires = [ "acme-dns-register.service" ]— so Caddy (and therefore the public HTTPS door forid.rehearsal.idss.nz) had not started when the app tried to open the ceremony window around02:05:56-57(kanidm's ownMintToken/idm_admin auth over the SSH tunnel succeeded fine at that timestamp perdroplet-journal.txt:1796-1817— that path bypasses Caddy entirely, so it's unaffected).ERR_CONNECTION_REFUSED: nothing was listening on 443 forid.<apex>yet.Suspected layer
Cross-cutting, three candidate owners — this needs a ruling (same shape as #494/#498), not a guess:
app/helper,OpenCeremonyhandler /ourcloud:open-ceremony) — could retryERR_CONNECTION_REFUSEDwith a bounded backoff before failing loud, the same "the port lies" pattern GOTCHAS #15 already named foracme-dns-registeritself, recurring one hop downstream (Caddy-behind-acme-dns, not acme-dns's own API).internal/foundinghand-off (internal/founding/handoff.go,OpenEnrolment) — could poll the public front door before opening enrolment / signalling hand-off, so hand-off means "the operator can actually sign in," not just "the control-plane process reported ready."tests/e2e/journey.droplet.spec.ts:316) — the default 30s Playwright timeout on[data-status="enrol-pending"]is far shorter thanacme-dns-register's own worst-case ~300s ceiling (GOTCHAS #15/#431); even a correct product-side fix needs the sign-in leg's budget raised to match.What plugging it needs
A ruling on which layer owns the wait (and its ceiling) before implementation — this is exactly the kind of own-VPS ceremony-window behavior call Ben has ruled on twice already this week (#494 password-vs-passkey, #498 public-door-vs-forward). Likely shape: app-side retry-on-
ERR_CONNECTION_REFUSEDwhen opening the own-VPS ceremony window, budgeted to at least coveracme-dns-register's own 300s cold-start ceiling, plus a matching bump to thesign-inleg's test budget. Not self-fixable here: no live droplet to verify real acme-dns/Caddy bring-up timing against, and the fix shape (which component gates, how long) is a design decision, not a mechanical one-line correction.drive
20260813T015909Zred atsign-in: `[Nmexpect([Nm[Nmlocator[Nm[Nm).[NmtoBeVisible[Nm([Nm[Nm)[Nm failedLocator: locator('[data-status="enrol-pending"]')
Expected: visible
Timeout: Nms
Error: element(s) not found
Call log:
[Nm - Expect "toBeVisible" with timeout Nms[Nm
[Nm - waiting for locator('[data-status="enrol-pending"]')[Nm
evidence:test-results/…/20260813T015909Z/` on matou-workstation (legs.json, droplet-journal.txt, trace)Diagnosis CONFIRMED (journal receipt) — and one correction of my own
The cold-start race framing is right. Drive
20260813T015909Z's own journal (logs/droplet-journal.txt):At the ceremony's
ERR_CONNECTION_REFUSED(02:05:57), Caddy was still GATED behind acme-dns registration — no :443 listener existed on the (correct) droplet. For the record: I had leaned stale-DNS-cache (drive-4's record steering at the old droplet); the journal kills that — the refused connection is fully explained at the right IP.The enabling defect: the S11 checklist's
public-entryrow ("Public entry — secure connections live") is markedDeployStepDoneUNCONDITIONALLY (internal/founding/deploy.go:685,deployChecklist— "prerequisites the join node already completed"). Nothing ever probes the public door, so the journey rests "done" and the finish leg completes while Caddy is minutes from serving. This is the #440/#443 false-green shape and GOTCHAS #12's divergence class, one row over.Fix direction (three parts, ordered by importance)
public-entrybecomes an honest probe (own-VPS path): before the row rests done, probehttps://<apex>(or the IdP host) until it answers over TLS, bounded by the ADR 0161 re-run family sized for a FIRST-BOOT cold start (acme-dns registration + DNS-01 wildcard issuance — minutes, not seconds; budget generously and tighten from green evidence like every ceiling). A genuinely-dead front door reds the row honestly. With this, S12's ceremony follows a door that is actually live.open-ceremony/createCeremonyWindow'sdid-fail-loadon ERR_CONNECTION_REFUSED / ERR_NAME_NOT_RESOLVED retries across a bounded window instead of failing the enrolment on one deadloadURL— real founders' fresh DNS lags too. The reset token survives re-loads until spent.Error occurred in handler for 'ourcloud:open-ceremony': … (-102): ERR_CONNECTION_REFUSED) — journey fault empty, no S12 state,enrol-pendingnever shown. An operator clicking "Open your dashboard" sees NOTHING. The rejection must land as a visible enrolment fault (and, with 2., only after the bounded retry is exhausted).Also for whoever picks this up: the droplet evidence harvest's
guest-caddy.logcollector is private-path-shaped (reads the local qemu unit) and collected nothing on this target — the journal saved us. A droplet-flavored caddy/acme collector would make the next race legible; fine as a follow-up ticket if out of scope here.swarm-claim host=elitebook-distributed-server-03 run=5495
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #499 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope
public-entry— the checklist row rests done UNCONDITIONALLY, nothing probes the public door (#499 part 1, Ben's ruling) #501public-entry— the checklist row rests done UNCONDITIONALLY, nothing probes the public door (#499 part 1, Ben's ruling) #501