brama diagnose¶
On the gateway's own host, explain why Brama is or is not serving. It opens every file the launcher reads, in the order the launcher reads them, and prints each beside what it has to agree with.
Invocation¶
brama diagnose [--json]
| Input | Required/default | Meaning |
|---|---|---|
--json | optional; off | Print the same lines once as {"sections": [{"title", "lines"}]}, one section per heading, instead of printing them as they are found. |
What it reads¶
Sections, in order:
units that start Brama—~/.stado/services/brama/current, where it points, and the release state~/.stado/release-state/brama.jsonrecords as serving.installed generations— every installed generation, the files it is missing, whether its entitlements router answersgrant capability, and whether its trust registry pins that exact binary. A generation's files are read from its root when it carriesbin/there, otherwise from the one platform directory inside it that does, whatever that directory is named; a directory with neither, or with several such platform directories, is printed as<path>: not a generation: <reason>.brama workload registerreads the running installation's files the same way.service env—~/.config/brama/service.env; a value is shown only when it is an existing path, so no secret is printed.policy grants against authority routes— the provider grants in the generation'spolicy.jsonagainst the authority-owned routes table.alias routes against routed provider grants— each alias route against the providers policy and routes both allow. In both sections a file is calledabsentonly when it does not exist; one that exists and cannot be read is printed as<path>: cannot be read: <cause>, one that does not parse as<path>: not JSON: <cause>.reachability— the loopback portservice.envnames (or a line saying it names none), the address the gateway announced when it bound, and every origintailscale serve statuspublishes, each with the status it answered.why the release stopped serving— from Stado's release state (~/.stado/release-state/brama.json): the rollout phase, the active release with its pid and start, oractive: none, so no Brama release serves this host; when the active release last answered its readiness read; the agent's detail; and every quarantined candidate digest, newest first, with the instant, thecausethe release agent named, theevidenceline it read it from and the wholereason. The section ends with the repair:stado release doctor brama --jsonnames each cause's remedy and whether the release agent retires that record by itself; a cause that holds the candidate is cleared after its repair withstado release quarantine clear --digest <digest> --reason <text>. A host with no release state saysno release state is recorded on this host, so no release agent has run Brama here.current boot attempt— the whole unit log (~/.stado/logs/<unit>.log) from the last linebrama launcher: boot attempt of <installation>; a log written by a launcher that predates that line is shown whole underthe unit's log (no boot attempt marker in it).
Output and state¶
Read-only: it writes nothing and contacts no provider. A file it cannot read is reported as a line in its section rather than ending the report, so one missing file does not hide the others. It exits 0 once the report is printed; the report, not the exit status, says whether the gateway can serve. To see whether each alias actually answers, run brama probe.
Refusals¶
An unknown argument is refused by the parser with exit 2. There is no other refusal.