magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

MGS3022: no broker answered

A step was not started. The workspace sets broker: required, and nothing answered on the broker socket, so no process could say whether this host has room for it.

[MGS3022] not starting (root) test: no broker answered for this host's capacity
  (broker: unavailable: dial unix:///run/user/501/magus/broker.sock: connection refused),
  and broker: required refuses to run unarbitrated. `magus broker status` says whether
  one is up and where it logs

The broker is the per-user process that holds the host's concurrency slots and declared memory_mb (see MGS3009). A run starts one when none answers, so this code means that start failed, or the broker died while the run was going and no other came up.

It exits 69, EX_UNAVAILABLE from sysexits.h, and not MGS3009's 75: a busy host clears on its own, while a host with no arbiter stays that way until something starts one. A wrapper that retries on 75 does not loop on this.

Resolution

  • Run magus broker status. It exits non-zero when no broker is running.
  • Read the broker's log, $XDG_STATE_HOME/magus/broker.log (~/.local/state/magus/ when unset), for why it did not start or why it exited.
  • Start one in the foreground to watch it: magus broker.
  • If this host should run without arbitration, set broker: best-effort (a step runs unarbitrated and says so once) or broker: off (no broker is started or asked).

See also

  • MGS3009: the refusal a broker gives when the host is full.
  • Concurrency: how the broker divides the host.
MGS3022brokercapacityrequiredmemory_mbconcurrencyexit 69
Last updated (00e25f0e)
Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Broker

The per-user background process that holds this host's capacity: the machine budget every run claims slots from, and the shared services runs keep warm. A run starts it on demand; broker: off in magus.yaml runs without one. See server.

CI

An ordinary magusfile-defined target you compose yourself with magus\needs - magus does not hardcode its stages. Magus.RunCI treats it specially only in that it strips the rw charm, it is the anchor magus affected ci keys off, and a selected scope with no project declaring it is a load error rather than a silent no-op. See targets.

Slot

One unit of the pool's capacity. A target acquires the slots it needs to run (most take one) and releases them when it finishes; the pool tracks capacity (total slots), running (acquired), and queued (blocked). See server.

Concurrency

How many targets run at once. It is bounded by the pool's capacity and set with --concurrency, MAGUS_CONCURRENCY, or the concurrency config key. See server.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.