← centrs docs

Error codes

165 codes. Every details_url a centrs error carries points at one of these pages.

CodeSummary
auth/failedBatch SSH authentication failed (execute --via ssh, sftp transfer).
cdb/already-existsdevices add refused: a saved device with that target and user already exists. Nothing was written.
cdb/conflictThe CDB changed after it was loaded; the stale write was refused so no change is lost.
cdb/create-failedA new CDB file could not be created at the resolved location.
cdb/createdNo CDB was at the default path, so centrs created an empty one there (warning).
cdb/decrypt-failedThe encrypted CDB could not be decrypted (wrong or missing password).
cdb/empty-groupThe named CDB group contains no records: a warning for a read, an error for a write-shaped fan-out.
cdb/empty-selectionThe target selection matched no CDB records: a warning for a read, an error for a write-shaped fan-out.
cdb/encrypt-failedThe CDB could not be rewritten with encryption.
cdb/file-exists`devices init` found a CDB already at the resolved location and wrote nothing.
cdb/invalid-optionA saved device property has a value centrs cannot use; it is ignored and the next setting source applies (warning).
cdb/invalid-recordA device record failed validation (a blank target or a wrong field type). Nothing was written.
cdb/lock-unsupportedThe CDB filesystem does not support the hard links required for write locking.
cdb/lockedAnother writer held the CDB lock past the wait timeout; nothing was written.
cdb/not-foundThe CDB file does not exist, or could not be created.
cdb/not-found-targetNo CDB entry matched the requested target string.
cdb/override-appliedThe device's saved via property was overridden by --via or CENTRS_VIA (warning).
cdb/parse-failedThe CDB file could not be parsed.
cdb/password-not-neededA CDB password was given for an unencrypted CDB and was ignored (warning).
cdb/password-requiredA CDB password is required for decryption or explicit encryption.
cdb/plaintext-backupsCDB backups may still contain plaintext credentials after encryption.
cdb/reserved-keydevices add or set got key=value for a field with its own flag (user, password, group, profile, session). Nothing was written.
cdb/reserved-optionA saved device has user, password, group, profile or session as a key=value property; it is ignored (warning).
cdb/target-not-registeredThe target is not a registered CDB device, and this surface only acts on registered devices. Register it with centrs_devices (op add) first.
cdb/unknown-fieldA device record holds CDB fields centrs cannot decode; they are kept byte for byte (warning).
cdb/unknown-optionA device's key=value is not a centrs device property. centrs keeps it, but it has no effect; with --strict, devices add and set refuse it.
cdb/write-not-permittedAn MCP write was refused because the device's mcp property is ro (the default). Nothing was sent.
cmr/caller-policy-not-enforcedWarning: the controller login lacks a policy the CMR command runs with on the clients, and RouterOS does not check it.
cmr/cancelledThe operation was cancelled before the command was sent to a CMR client.
cmr/client-disconnectedCMR skipped a client that is not connected to its controller; the command was not sent.
cmr/client-script-not-validatedWarning: a caller-addressed `/cmr/device/run-script` was validated as a controller request; its script was not validated on the clients.
cmr/console-onlyThe CMR command is an interactive console view that breaks an API session, so centrs refused it before running it.
cmr/empty-selectionThe CMR selection matched no device on the controller: for `--cmr`, a warning for a read and an error for a write; for a fleet command such as `/cmr/vlan/add`, a warning.
cmr/membership-changedA CMR client left the label selection or changed its key between validation and dispatch; the command was not sent.
cmr/not-a-controllerThe target does not answer `/cmr/device`; it is not a CMR controller.
cmr/outcome-unknownThe command was sent to a CMR client but no final status came back; it may still be running.
cmr/output-truncatedWarning: CMR clipped a client's command output at its ~60 KiB cap.
cmr/policy-deniedA CMR client refused a statement because CMR scripts run without the policy it needs; earlier statements already ran.
cmr/rule-selects-every-deviceWarning: a CMR rule command has no device `labels` (and, for VLAN, no `port-labels`), so the rule applies to every device, the controller included.
cmr/selection-includes-controllerWarning: a CMR fleet command selects the controller's own row as well as its clients.
cmr/selection-incompleteThe controller did not answer whether every device matches the labels, so nothing was run.
cmr/validation-incompleteA CMR client's validation result was incomplete or clipped, so the command was not sent to it.
discover/broadcast-unavailableUDP broadcast could not be enabled, so discover only listened for unprompted announcements (warning).
discover/failedMNDP discovery failed with no more specific code.
identity/ambiguousThe target matches more than one CDB entry.
identity/no-matchThe target has no CDB entry matching the requested --match selector.
input/empty-stdinA flag that reads its value from stdin (e.g. `--password-stdin`) received nothing.
input/incomplete-gpsA device location was given without both lat and lon. Nothing was written.
input/invalid-altitudeThe altitude is not a number, or the altitude type is not MSL or AGL. Nothing was written.
input/invalid-bboxThe --bbox is not south,west,north,east with south <= north and west <= east. Nothing was read or sent.
input/invalid-commandThe command line or request was malformed: an unknown command or flag, or a missing or invalid argument.
input/invalid-coordinateA latitude or longitude is not a decimal-degrees number in range. Nothing was written or sent.
input/invalid-matchThe --match value is not user=, target= or a record type. Nothing was changed.
input/invalid-pathAn api endpoint or file path cannot be sent as given (row id, empty path, or a character SFTP cannot quote). That path was not sent; a transfer may have read other paths first.
input/invalid-queryA --query expression does not parse as a `print where` condition.
input/invalid-radiusThe --near radius is not a non-negative number with an optional m/km/mi/ft unit. Nothing was read or sent.
input/invalid-routeros-pathThe RouterOS path is malformed: not slash-prefixed, a segment that is not a menu name, or characters a REST URL would reinterpret.
input/invalid-stdinA flag that reads its value from stdin (e.g. `--password-stdin`) received bytes that are not valid UTF-8 text, or began with a byte-order mark.
input/invalid-targetThe target string is invalid for the requested operation.
input/local-destinationA local download destination cannot be written (missing parent directory, a directory, or no permission).
input/local-file-not-foundA local file centrs was given could not be read. Nothing was sent.
input/mac-addressThe value is not a MAC address of six hex octets. Nothing was sent.
input/max-results-exceededThe result was larger than the --max-results budget, so it was withheld. retrieve changed nothing; execute had already run the command.
input/unsupported-queryA --query uses something the RouterOS API query cannot run (`~`, `in`, a `$variable` or `[command]`).
internal/byte-stringA binary RouterOS word held a character that is not a byte.
internal/devices-failedA devices command failed with an error centrs has no code for (a centrs bug).
internal/mcp-startcentrs mcp failed to start; no MCP session began.
internal/mcp-toolAn MCP tool failed with an error centrs has no code for (a centrs bug).
internal/native-api-lengthA native-API word length could not be encoded, so the command with that word was not sent (a centrs bug).
internal/settings-failedA settings command failed with an error centrs has no code for (a centrs bug).
internal/unhandledA command failed with an error centrs has no code for (a centrs bug).
internal/unreachablecentrs reached a state its code treats as impossible (a centrs bug).
mndp/encode-failedAn MNDP packet could not be built: a MAC or IPv4 field is malformed. Nothing was sent.
mndp/listen-failedThe MNDP UDP listener could not bind.
mndp/malformedAn MNDP datagram could not be decoded; discover skips it and counts it as a warning.
quickchr/machine-not-foundNo quickchr machine is registered under that name.
quickchr/machine-stoppedThe quickchr machine is not running, so it has no live connection facts.
quickchr/package-unavailableThe optional `@tikoci/quickchr` package is not installed.
quickchr/ssh-auth-unavailableThe quickchr machine forwards SSH but vouches for no verified SSH key, so no non-interactive SSH/SFTP login is possible.
quickchr/unsupportedThe installed `@tikoci/quickchr` is too old or speaks a newer descriptor version than centrs understands.
quickchr/unsupported-viaThe chosen `--via` has no usable service on the quickchr machine (not forwarded, or marked unavailable).
routeros/action-timed-outRouterOS dropped a command's reply at that command's own limit (native-API `action timed out`); the command may still be running or may have finished.
routeros/api-fatalRouterOS ended the native-API session with a !fatal reply.
routeros/api-protocolA RouterOS native API reply could not be parsed.
routeros/api-trapRouterOS reported an error on a native-API command, with a message centrs has no specific code for. The command may have partly run.
routeros/btest-connection-count-single-streamFewer TCP data connections were opened than --connection-count requested (e.g. authenticated multi-connection is not yet supported), so throughput will not scale to the full count.
routeros/btest-protocolA bandwidth-test (btest) packet could not be decoded.
routeros/btest-too-many-sessionsThe btest server refused a client because max-sessions is reached.
routeros/btest-udp-tx-size-ignoredFor UDP --direction both, the btest wire protocol carries a single tx-size; --remote-udp-tx-size is ignored and --local-udp-tx-size is used for both directions.
routeros/command-failedRouterOS reported a command failure.
routeros/ec-srp5-protocolAn EC-SRP5 authentication message or key could not be processed.
routeros/invalid-valueRouterOS rejected the value supplied for an argument.
routeros/mac-telnet-errorThe device sent a MAC-Telnet error packet and the session ended.
routeros/mac-telnet-not-readyA MAC-Telnet session was used before it was open, or after it closed.
routeros/mac-telnet-protocolA MAC-Telnet datagram for this session could not be decoded, and centrs closed the session.
routeros/mac-telnet-unsupported-authThe device requested an unsupported MAC-Telnet auth mode.
routeros/no-such-itemThe RouterOS menu exists, but no item matches the id, number or name given.
routeros/permission-deniedRouterOS refused the command because the user's group lacks a policy it needs.
routeros/protocol-not-implementedThis command does not run over the requested --via protocol yet.
routeros/request-failedRouterOS reported an error on a REST, SSH or MAC-Telnet request, with a message centrs has no specific code for. The command may have partly run.
routeros/session-closedRouterOS closed the session before the request completed.
routeros/unknown-attributeRouterOS does not recognize the supplied attribute.
routeros/unknown-pathRouterOS has no command at the requested path.
routeros/unsupported-capabilityThe --via protocol cannot do what this command needs.
routeros/version-unsupportedThe device's RouterOS version does not provide the operation this command needs.
settings/consequential-value`settings set` accepted a syntactically valid value with a real, non-obvious consequence (e.g. a global --insecure default, or a transfer-via value gated elsewhere).
settings/invalid-booleanA boolean-like setting received a non-boolean value.
settings/invalid-formatAn unsupported output format was requested.
settings/invalid-integerAn integer setting received a non-integer or out-of-range value.
settings/invalid-timeoutA timeout setting received an invalid value.
settings/invalid-viaAn unsupported protocol identifier was supplied to --via.
settings/reserved-key`settings set`/`reset` refused a credential-shaped or self-referential CENTRS_* key.
settings/skip-env-file-active`settings print` ran under --skip-env-file; the shown centrs.env values would not apply to other commands run in the same environment.
settings/unknown-key`settings get`/`set` received a token that is not a recognized CENTRS_*-shaped setting.
settings/unsafe-protocol-blockedA cleartext protocol (e.g. ftp) was requested without the explicit ALLOW_UNSAFE_PROTOCOLS opt-in.
target/mac-not-in-arpThe MAC is not in the host ARP cache, so it cannot be resolved to an IP.
target/mac-requiredThe chosen L2 transport (mac-telnet) needs a MAC-address target.
target/mac-unresolvedThe MAC target could not be resolved to a host.
target/unresolvedNo connectable host for this target: no target was given, --host or CENTRS_HOST was empty, or the selection named the credential-only __default__ record.
transport/auth-failedRouterOS rejected the credentials over the transport.
transport/auto-methodWith no --via, transfer chose sftp because the upload is over 60 KB (warning).
transport/cancel-unacknowledgedRouterOS did not acknowledge a stream's /cancel within the timeout; centrs ended the stream and closed the session locally.
transport/capability-unsupportedThe chosen transport cannot perform this kind of operation.
transport/checksum-unavailableRouterOS gives no file digest for --verify checksum: REST/native compared sizes instead, and SFTP compared nothing (warning).
transport/connection-closedThe transport connection was closed before a result.
transport/connection-refusedThe device refused the connection.
transport/dnsThe device host name could not be resolved.
transport/edge-auth-failedAn HTTP layer in front of RouterOS (auth proxy, tunnel edge, WAF) refused the request before RouterOS answered it.
transport/host-key-mismatchThe device's SSH host key did not match the known key.
transport/incomplete-transferA file transfer could not be verified: its size did not match, or RouterOS showed none.
transport/insecure-trustInsecure mode is on, so TLS certificates and SSH host keys are not verified (warning).
transport/local-tool-missingA required local CLI (e.g. the OpenSSH `sftp` client) is not installed or not on PATH.
transport/networkA network request to the device failed.
transport/provider-trustPeer verification is relaxed for a named-live-provider endpoint (a quickchr VM's self-signed TLS cert / ephemeral SSH host key), trusted by the provider's loopback-forward voucher.
transport/stream-overflowMore stream replies were waiting unread than the buffer allows, so centrs ended the stream rather than drop any.
transport/timeoutThe transport request timed out.
transport/tls-certificateTLS certificate validation failed for the device.
transport/unsupported-operationThe transfer method cannot do this operation (copy over sftp, or an upload over 60 KB over rest/native). Nothing was written; a copy may have looked up its files first.
transport/write-outcome-unknownWarning: a write failed after it was sent, so it may have run on the router; centrs did not retry it.
usage/confirmation-requiredA write-shaped command needs explicit confirmation (pass confirm:true / --yes after review).
usage/conflicting-flagsTwo or more supplied flags conflict.
usage/fanout-not-supportedThe command or mode cannot fan out across multiple targets (e.g. terminal, --listen/--stream).
usage/flag-after-separatorA centrs flag was written after `--`, where every token is RouterOS input.
usage/invalid-concurrency--concurrency is not a whole number of at least 1. Nothing was sent.
usage/invalid-cursorAn explain --cursor is not a byte offset inside the input being analyzed.
usage/invalid-methodThe -X/--method value is not a supported HTTP method.
usage/missing-flag-valueA flag that needs a value was given none, or was followed by another flag.
usage/missing-groupA group fan-out was asked for with an empty group name. Nothing was sent.
usage/missing-labels`--cmr` was given without a `--labels` expression.
usage/not-implementedThis command form is recognized but not built yet (devices edit; transfer via scp, fetch or ftp). Nothing was sent.
usage/removed-flagA flag or request field was removed; the error names its replacement.
usage/stdin-ignoredstdin was redirected but the input came from the positional argument, so anything piped in was not analyzed.
usage/stdin-is-ttyA flag that reads its value from stdin (e.g. `--password-stdin`) was given while stdin is a terminal.
usage/target-existsThe destination already exists on the router, and centrs does not overwrite it without --force. Nothing was changed.
usage/timeout-out-of-rangeThe --timeout is longer than REST's 60-second ceiling. Nothing was sent.
validation/menu-unavailableRouterOS 7 publishes this menu or command, but this device does not have it — usually hardware, build or version.
validation/not-followableThe RouterOS menu cannot be followed: it is a single record, or its print has no follow-only.
validation/not-implementedRetired: emitted by 0.1.0–0.1.7 for a validation feature that was not built yet.
validation/optionAn option value is outside what centrs accepts.
validation/package-missingThis device has no such menu or command; MikroTik publishes it in a package that is likely not installed.
validation/syntaxThe command syntax was rejected by the validation gate — offline analysis, or the RouterOS :parse probe.
validation/unknown-attributeAn attribute is not valid for the path/verb per /console/inspect.
validation/unknown-pathThe RouterOS path does not exist, or does not expose the requested command.
wait/deadline-exceededThe wait deadline passed before readiness or its condition was established.
wait/interruptedThe wait was cancelled before readiness or its condition was established.

centrs error pages

Each CentrsError carries a details_url of the form https://tikoci.dev/centrs/errors/<code>/. This directory holds the human-readable page for each code, and is the home for the error URL scheme and the RouterOS-fault mapping (below); the constitution keeps only the one-line contract.

URL scheme

details_url is https://tikoci.dev/centrs/errors/<code>/, with <code> the slash-namespaced code as-is and a trailing slash (e.g. https://tikoci.dev/centrs/errors/routeros/unknown-path/).

Source of truth and the contributor contract

The enumerable list of every code lives in code, not here: src/core/error-catalog.ts. Every page in this directory is written by hand to the page contract below. bun run docs:errors scaffolds a stub for a code that has no page, and never overwrites a page that exists.

When you introduce a new error code you must, in the same change:

  1. add an entry to src/core/error-catalog.ts, and
  2. add a docs/errors/<code>.md page: run bun run docs:errors, then replace the stub with a real page. A stub fails the test.

test/unit/error-pages.test.ts enforces this three-way consistency — every live code: literal is cataloged, every catalogued code has a page, and no page is orphaned. A missing page is a centrs bug, so the guard fails the build.

Families

Codes are slash-namespaced family/slug. The families and where they originate:

The Pages build lists every code on the catalog index and rewrites the pages' relative links for the site. test/unit/error-pages.test.ts checks those links on every PR, and fails on any page that is still a scaffold stub (#659): a new code ships with a written page.

Page contract

The envelope already carries the code, a one-line summary and a one-line remediation. A page is for what does not fit on that line: fixes that depend on the transport, version or platform, causes that interact, and the cases with no fix. Keep pages short. This shape is a baseline for authors and reviewers, not a form to fill; leave a section out when it has nothing to say, and depart from it when a code needs to.

  1. H1 — # `<code>`, exactly (the test checks it).
  2. Lead (one or two sentences, required) — what failed, and whether anything ran or changed on the device. It must agree with the catalog summary, which MCP resources serve on its own.
  3. Emitted by (required when more than one command or transport raises it) — which commands and --via transports. This tells a reader whether switching transport can help.
  4. Context — what each context.* key means.
  5. Typical triggers — each one says where it comes from: (code) read from the emission site, (CHR 7.x) reproduced on a device, (field) seen in a real session, or (unverified). An unverified trigger is allowed and is better than silence; it is never written as fact.
  6. Fix — ordered, concrete centrs and RouterOS commands.
  7. Limits — RouterOS versions, platforms or transports where no fix exists.
  8. If this looks wrong — the centrs bug it most likely is (a missing mapping, a wrong suggestion, a stale install) and what to put in an issue: the command, the --json envelope, centrs --version, and an ask to remove passwords and other secrets from both first. There is no --bug-report flag.
  9. Related — sibling codes, as relative .md links.

RouterOS-side claims follow routeros-grounding.instructions.md. A page for a code that only rides as a warning (warnings carry no details_url) is reached from this index alone, so it can be a lead and a fix. internal/* pages say that the code is a centrs bug and what to report.

A code that is no longer emitted keeps its page, marked Retired in the lead, when it shipped in a release (the URL is stable). A code that never shipped is removed with its page.

Tips

Tips follow the same contract with one difference: most tips need no page. A tip is advice whose message and fix already say everything; it gets a page only when its advice does not fit in one sentence of about 40 words, or when it depends on the version, platform or transport. A tip with a page is flagged page: true in src/core/tip-catalog.ts, its page is docs/tips/<slug>.md, and only then does it carry a detailsUrl (https://tikoci.dev/centrs/tips/<slug>/, without the tip/ segment). test/unit/tip-catalog.test.ts keeps the flag and the file in step, and checks the page's links. The Pages build publishes each page as tips/<slug>/ with the same link rewriting and checks as the error pages; test/unit/pages-site.test.ts assembles the site and fails when a tip's detailsUrl names no published page.

RouterOS-fault mapping (routeros/*)

The authoritative vocabulary for routeros/* is the live router's own strings (grounded on CHR 7.23): the REST detail field on HTTP ≥400 — shape {"detail":"<msg>","error":<http-status>,"message":"<http reason>"} — and the native-api !trap carry the same text for the same fault, so one shared table (src/core/routeros-errors.ts) maps both transports. The original string is always preserved — in context.detail for a matched rule, and in cause for the catch-all (routeros/request-failed). Ground new mappings on CHR evidence, not assumption (tikoci/m2ir is protocol-IR reference, not an accessible mapping source — the router strings are).