docs: add ecosystem.config.cjs.example + cf-tunnel debug notes#31
Open
AdaInTheLab wants to merge 1 commit intomainfrom
Open
docs: add ecosystem.config.cjs.example + cf-tunnel debug notes#31AdaInTheLab wants to merge 1 commit intomainfrom
AdaInTheLab wants to merge 1 commit intomainfrom
Conversation
Document the locally-managed Cloudflare Tunnel setup so the next time
the auth wedges itself ("Provided Tunnel token is not valid" 1033/530)
the fix path is recoverable from the repo, not from memory.
Changes:
- New ecosystem.config.cjs.example: canonical shape with placeholder
values. Header comment explains the locally-managed vs remote-managed
tunnel auth distinction (the trap that produced the outage). Real
ecosystem.config.cjs stays gitignored.
- CHANGELOG "Unreleased" entry with two diagnostic recipes:
1. token-vs-cred-file mismatch
2. half-zombie PM2 entry recovery (delete + start --only)
Co-authored-by: Sage <sage@thehumanpatternlab.com>
😼📘 Carmel Epistemic Stamp™📘 Carmel Epistemic Stamp™
This automated judgment has been issued by the Chief Judgment Office (CJO). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Document the cf-tunnel topology that caused today's outage so the fix is reachable from the repo next time, not just from memory.
Background
`api.thehumanpatternlab.com` started returning Cloudflare error 1033 / HTTP 530 ("Argo Tunnel: no available origin"). `pm2 logs cf-tunnel --err` showed an infinite loop of:
Root cause: the cf-tunnel block in production's `ecosystem.config.cjs` was using the `--token ` form, but the tunnel was created locally (`cloudflared tunnel create`) — those are mutually exclusive auth shapes. Locally-managed tunnels authenticate via the cred file at `~/.cloudflared/.json`. Fix on the box: change `args` to `["tunnel", "run", "lab-api"]`.
`ecosystem.config.cjs` itself is gitignored (deliberately — it has `SESSION_SECRET`), so this PR doesn't fix prod directly. The fix is already live there. This PR captures the knowledge.
Changes
Testing
Co-authored-by: Sage sage@thehumanpatternlab.com