routeros/unknown-path
RouterOS has no command at the requested path, so it refused that statement. Either a menu in the path does not exist, or the menu exists but has no such command (verb). A single command did not run; in a multi-statement script, the statements before the refused one already ran.
Emitted by
retrieve, execute, api and
transfer over --via rest-api and
--via native-api, and execute over
--via ssh and --via mac-telnet. RouterOS gives
the same answer on each transport, so switching does not help. With
validation on, most unknown paths stop before sending as validation/unknown-path;
this code is what the router itself says, for example with
--no-validate.
Context
detail: RouterOS's message, verbatim.httpStatus,status,path: the REST request, when REST carried it (HTTP 400).
Typical triggers
- An unknown menu:
/nosuch/thing/printgivesno such command prefixon the native API andno such command or directory (nosuch)over REST (CHR 7.25.1). - A verb the menu does not have:
/system/script/nosuch, orprintunder a command such as/system/reboot/print, givesno such commandon both transports (CHR 7.25.1). - A menu path with no verb:
execute '/system/identity'givesno such commandon the APIs, withtip/execute-bare-menu-pathnaming the read (CHR 7.25.1). - On the console transports,
bad command name …with its(line N column M)position (code). - A menu from a package that is not installed, such as
/cmr/devicewithout thecmrpackage (CHR 7.24.5). With validation on, this stops before sending asvalidation/package-missing.
Fix
- Check the path and verb with
centrs explain <router> '<command>', which asks the router's command tree. A menu path alone is not a command: add a verb such asprint, or read the menu withcentrs retrieve <router> <menu>. - If the menu belongs to a package, check
/system/packageon the device. - Before running a script again, check what its earlier statements changed: a rerun repeats them.
Related
routeros/no-such-item: the path exists, but the item named does not.validation/unknown-path: the same fault, caught before sending.routeros/unknown-attribute: the command exists, but a parameter name does not.