Repository navigation
Description
What's the problem
There is no way to get logs off a Pithead appliance after an incident.
- The appliance has no shell, and owners have no SSH.
- The support bundle is a host-CLI command, which a shell-less box cannot run (Appliance feature parity: everything host-CLI-only is impossible on a shell-less box #786).
- The planned live log viewer (Add a bounded, redacted live log API (tail and follow per service) and a dashboard log viewer #3978, v2.1.0) shows current logs only. It does not export a past time window.
So when an owner's appliance reports an outage, neither the owner nor the project can tell what happened.
That is the situation for the owner's production appliance on 2026-11-11. Its Healthchecks check went DOWN about 09:47–12:24Z (2 h 37 min) and again 12:42–13:32Z (49 min). The cause cannot be confirmed.
What it impacts
- Owners: every appliance owner who sees an outage, a stalled miner or a failed update can only reboot and hope. They cannot send the project evidence.
- The project: user reports of appliance problems cannot be diagnosed. Intermittent issues stay open for lack of logs (for example Appliance recovery can commit healthy while the local miner stalls until restarted #3375).
- Monitoring: without logs, a real outage looks the same as a failed health ping (below).
How I found it
This came from the owner's production appliance alerts on 2026-11-11, from the Healthchecks Telegram bot ("pithead-prod is DOWN … success signal did not arrive on time").
The appliance could not be read: no shell or SSH, and it is the owner's box. Indirect evidence:
- The mining service stayed up. The
xmrigjournals of three rigs that mine to the production appliance show them on its stratum continuously through both windows. The only gaps were two 5-second reconnects, at 09:26Z and 09:40Z. - The health ping is what failed. Pithead sends the Healthchecks ping through Tor (socks5h). A test bench's Tor egress probe failed 9 times in the 09Z hour, and once each at 11Z and 12Z. That points at the Tor path, but it is an inference. The appliance's own Tor and dashboard logs are what would confirm it.
How important is it
High. The owner asked for it after a production incident. It is the prerequisite for supporting appliance users at all. It is placed on v2.0.4 because it is needed to diagnose a live problem; under the patch-release placement rule a new capability would normally go to 2.1.0, so the owner can move it.
Acceptance criteria
- An authenticated, owner-only dashboard action downloads a support bundle for a chosen time window, defaulting to the last 72 hours. Contents:
- the journald entries for every Pithead unit and container (dashboard, Tor, monerod, tari, p2pool, xmrig-proxy, the built-in miner, pithead-boot, update/RAUC, address watch);
- health and status history;
- Tor bootstrap and circuit state;
- versions, slot, and config shape (keys only).
- The bundle is redacted with the existing support-bundle redaction (
bundle_redact_logand the Add a bounded, redacted live log API (tail and follow per service) and a dashboard log viewer #3978 redactor, shared): no wallet secrets, tokens, passwords, stratum credentials or onion private keys. A test asserts a seeded secret never appears in the output. - The journal survives reboots for at least the bundle window (persistent journald with a size cap), so a bundle taken after a reboot still covers the incident.
- Each Healthchecks, Telegram or webhook ping attempt that fails is logged with its reason (Tor SOCKS timeout, DNS, HTTP status). The dashboard shows the last failures, so a failed ping can be told apart from a real outage.
- The same bundle can be produced from the appliance's recovery or maintenance screen, without the dashboard running.
- The docs say how an owner downloads a bundle and how to send it with a bug report (link with Add a 'Report a bug' link (bugs@pitheadmining.com) to the shell and Maintenance #3746).
- Ships in v2.0.4 as a dashboard action (owner, 2026-11-12). The owner will use it to export the full record of the 2026-11-11 production outage (Prod Tor client wedged for 15 h: Monero node peerless and tor auto-heal never escalated past a rejected NEWNYM #4045, Stop serving stratum work while the node is stale so rigs fail over to their backup pool #4046) once v2.0.4 is installed on that appliance.
- The bundle includes each container's full retained log for the chosen window, not only the last 200 lines (the DIY bundle runs
docker compose logs --tail 200today). - The bundle includes every file the owner saved under
/data/pithead/support/, redacted the same way. Incident captures taken at the console before this feature existed are exported with everything else.
Possible solutions
- Reuse the DIY support-bundle code path (
lib/pithead/07-support-bundle.sh) behind a dashboard endpoint. Run it in the existing control service, write the archive to a private temp file, and stream it to the authenticated owner. - Add a
ping_failuresring buffer in the dashboard's existing SQLite store for the notifier, shown on the health page. - Make journald persistent on
/datawithSystemMaxUsesized from free space, if it is not already persistent for every unit. - Unknown: whether the appliance journal is persistent today for all services. The fix should measure that first.
Activity
pithead-architect commentedon Nov 11, 2026
A local session judged this too big for one local session (Too big for one local session: the issue carries four independent objectives (dashboard bundle download over the control channel, notifier ping-failure logging with dashboard display, a no-dashboard recovery-state bundle, and a journald persistence guarantee) touching about a dozen source files acro). The runner filed 4 chunks as sub-issues and marked this issue a tracker, so it is not picked again:
pithead-developer commentedon Nov 12, 2026
Correction to my earlier reading of the 11-11 outage. It was not only the Tor health ping that failed. The appliance's Tor client wedged at ~09:27Z, the Monero node had no peers from then on and was still stuck 15 hours later, and the rigs kept mining a stale tip. Details are in #4045 (the Tor wedge and the auto-heal gap) and #4046 (stop serving work while the node is stale).
The evidence again came only from the owner copying per-service logs out of the dashboard by hand. The appliance journal around the 09:26–09:27Z trigger is still unreachable, which is exactly the gap this issue covers.
pithead-developer commentedon Nov 12, 2026
Owner, 2026-11-12: log pulling ships in v2.0.4 no matter what. If the Tor wedge fixes (#4045, #4046) slip, this one still ships.
Additions to the acceptance criteria:
doctor --json.pithead-developer commentedon Nov 15, 2026
Owner, 2026-11-15: "make sure 2.0.4 has the export logs feature also. i want to be able to select a time frame and then dump pretty much every log on the system into a zip file for download. this is so we can debug issues users face"
Operator notes: the closed children do not deliver this yet.
A read-only audit of develop at
eb929ceb93found gaps against this request and against this tracker's own criteria. Each gap was re-checked by a second agent..tar.gz, not a.zip(lib/pithead/07-support-bundle.sh,46b-control-support-bundle.sh).doctor --json, chain status snapshots, and Tor guard/circuit state;/data/pithead/support/(C12).New v2.0.4 release-blocker sub-issues will follow on this tracker. This tracker stays open until they merge and an appliance run proves the zip.
./pithead support-bundle --since/--until#4130pithead-architect commentedon Nov 21, 2026
The support bundle ships in 2.0.4: #4127, #4128 and #4129 are merged, and an appliance run (bench job 607, 2026-11-21) proved the baseline and Tor-wedged bundles complete, window-bounded and redacted. The remaining proof, the monerod-stopped leg in #4131, moved to v2.0.5 under the owner's 2026-11-16 ruling, so this tracker follows it there and no longer gates 2.0.4.