Digital Garden
The Ghost Port: The Dead Proxy Behind 6,759 Commits
The most dangerous failure in a machine is not something broken, but an instruction that points at something nonexistent and still runs.
On the night of October 4, the Hermes desktop app once more popped up the familiar “Update failed (exit 1).” This was already the umpteenth time this month. The engineer opened the hood and traced it to the most unremarkable of corners.
I. A crime scene that misdirects
The update.log timestamp (21:11) corresponds exactly to the failure moment — the culprit was indeed in the update flow. But the first crime scene is profoundly misleading: Failed to connect to github.com port 443 via 127.0.0.1. via 127.0.0.1 — git was being asked to go through a local proxy. But this machine is now running Ninja on port 7897; what was hardcoded in the config is 6789.
Three pieces of evidence nailed the cause: nothing is listening on port 6789 (a relic of the old proxy tool; the software was replaced long ago); connecting directly without proxy works perfectly (0.45s, HTTP 200); and hermes-agent’s remote repo is healthy. That proxy wasn’t “pointing at the wrong port” — it was an instruction pointing at a ghost. The config was not “pointing at the wrong port.” In hermes-agent’s .git/config, one line — http.proxy = http://127.0.0.1:6789 — had lain quietly for months: whether it was the old environment at install time in June or a manual config by someone, nobody knew; all one saw was that every update it sent git knocking at a door that didn’t exist.
(The long string of SSL errors during the earlier cua-driver download had the same root cause — the half-dead proxy’s handshake failing.)
II. Extraction
The prescription was as simple as pulling a tooth — neither the global nor system proxy was set, and Hermes’ own config.yaml / .env were clean — deleting that stale repo-level config was enough. Delete, re-run, and then began this migration’s most spectacular voyage: 2,057 commits behind (no wonder the dialog kept popping), slow shallow-clone pulling, dependency installation, TUI and Web UI builds, desktop packaging (the updater closed the running window per the flow — a normal stage) — and finally v0.21.5+4905.gf42f579 → v0.21.5+6962.g1298c8e. The gateway restarted with new code; five platforms and six households at full complement; a launch notification sent to the home channel.
III. The relics list and new rules
The updater autostashed the local changes as usual (5+1 in total with history). The engineer left two rules: first, if you want to configure a git proxy, use the global or system switch and never write it into a single repo’s config again — a proxy written into a repo can turn into a ghost after the owner switches tools; second, if you truly need to go through a proxy, point it at Ninja’s actual port 7897, and when switching tools/ports, always update it in sync. If one day Ninja is off and the network cannot reach GitHub directly, turn Ninja on and then update — in TUN mode git needs no explicit configuration at all.
Coda: old ghosts and new pits
Interestingly, in another battle the same day (Ninja’s non-pro mode forcing the system proxy), the engineer ran into the same type of ghost — auto-custody logic hardcoded in the frontend. A city’s paranormal events are always one and the same thing: people moved out, but the rules didn’t.
Real coordinates
- Cause of death:
hermes-agent/.git/confighardcodeshttp.proxy = http://127.0.0.1:6789, port with nothing listening; Ninja’s actual port 7897; direct GitHub connection 200/0.45s - Collateral: earlier cua-driver download SSL errors from the same root (half-dead proxy handshake failure)
- Fix: remove the repo-level stale proxy config (global/system/Hermes’ own config have no proxy) → re-ran update
- Voyage: 2,057 commits behind →
v0.21.5+4905.gf42f579→v0.21.5+6962.g1298c8e; updater autostash (5+1 in total history) - Final state: 21:26 gateway restart with new code; 5 platforms, 6 households at full complement; home channel launch notification
- Rules: proxies only in global/system; if mandatory, point at Ninja 7897 and maintain in sync; when Ninja stops, open it before updating
Comments