CLI reference / service / serving

stado service serving

Invocation

stado service serving [OPTIONS] --host <HOST> <NAME>

Purpose

Is the DECLARED unit the process on its own port? `show` reports what the unit file declares and used to spell that `runs`; `endpoint-check` reports whether anything answers on a declared port. Neither asks the one question an outage turns on. On 2026-08-30 `com.wisent.always-on.weles` was reported `runs` while both pids its last restart produced were already gone and its stderr ended in `EADDRINUSE 127.0.0.1:58101`: something WAS listening there, and it was a different launchd job — the undeclared unit the Weles release deployer bootstraps, running an identical argument vector. So ownership here is decided by launchd label, never by argv. The pid holding each port is walked up its own parent chain until a pid appears in `launchctl list`, because a launcher script is the job and the server it starts is the child that holds the socket. A label that cannot be read — a system LaunchDaemon is invisible to an unprivileged `launchctl list` — is reported `unknown`, never as "nobody owns it". Verdicts are `serving`, `not_serving`, and `unknown` for a question that could not be answered; the third is never folded into either of the others. Exits non-zero on anything but `serving`, because a control plane that cannot tell reported this host healthy for days.

Required inputs and options

Input or optionContract
<NAME>Service name, or the host's own name for the unit
--host <HOST>The single registry host to check
--port <PORTS>One loopback port this unit is supposed to SERVE; repeat for each. Deliberately not taken from the unit's env file. That file names every endpoint the unit touches, and most of them are ports it CALLS — `STADO_API_URL`, `WC_SKARBIEC_URL` — owned by other services on purpose. Judging those as "this unit must own it" makes every healthy dependency a finding, which is how a check stops being read. `endpoint-check` is the command for dependencies; this one is about the ports the service itself answers on. Omit these and the service directory's declared endpoint for this host is used.
--jsonCommand option; required or optional as shown in the invocation.

Output and state effect

It performs the operation described above and emits its operator result on standard output or standard error. Any state change is limited to the resources and records named by the purpose and options on this page.

Refusals

  • Judging those as "this unit must own it" makes every healthy dependency a finding, which is how a check stops being read.
  • Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.