{"record":{"id":"e763dce6b52c81f3","repo":"jenkinsci/jenkins","slug":"error-occurred-while-performing-this-command-see-e763dc","errorCode":null,"errorMessage":"Error occurred while performing this command, see previous stderr output.","messagePattern":"Error occurred while performing this command, see previous stderr output\\.","errorType":"exception","errorClass":"AbortException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/OfflineNodeCommand.java","lineNumber":89,"sourceCode":"                    String adv = EditDistance.findNearest(node_s, names);\n                    throw new IllegalArgumentException(adv == null ?\n                            hudson.model.Messages.Computer_NoSuchSlaveExistsWithoutAdvice(node_s) :\n                            hudson.model.Messages.Computer_NoSuchSlaveExists(node_s, adv));\n                }\n                computer.cliOffline(cause);\n            } catch (Exception e) {\n                if (hs.size() == 1) {\n                    throw e;\n                }\n\n                stderr.println(node_s + \": \" + e.getMessage());\n                errorOccurred = true;\n                continue;\n            }\n        }\n\n        if (errorOccurred) {\n            throw new AbortException(CLI_LISTPARAM_SUMMARY_ERROR_TEXT);\n        }\n        return 0;\n    }\n}\n","sourceCodeStart":71,"sourceCodeEnd":94,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/OfflineNodeCommand.java#L71-L94","documentation":"AbortException thrown by the shared constant CLI_LISTPARAM_SUMMARY_ERROR_TEXT (CLICommand.java:133) after the per-node loop when more than one node was requested and at least one failed. Each per-node failure was already printed to stderr; this is only the summary. It never fires for a single-node invocation because single-node errors propagate directly (hs.size()==1 rethrows).","triggerScenarios":"`offline-node a b c` where at least one of a/b/c does not exist or its cliOffline(cause) throws.","commonSituations":"Batch scripts that fan out offline-node over a node list containing stale or transient agents.","solutions":["Read the preceding stderr lines: each failing node was printed as `<node>: <message>`.","Remove or fix the failing node and re-run.","Validate the whole list against getComputers() before invoking."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Set<String> known = Jenkins.get().getComputers().stream()\n    .map(c -> c.getName()).collect(Collectors.toSet());\nList<String> valid = nodes.stream().filter(known::contains).toList();","typeGuard":null,"tryCatchPattern":"try {\n    int rc = cli.execute(args);\n} catch (AbortException e) {\n    if (CLI_LISTPARAM_SUMMARY_ERROR_TEXT.equals(e.getMessage())) {\n        // partial failure: parse prior stderr lines for the failing node\n    }\n}","preventionTips":["Pre-filter multi-target lists against getComputers().","Capture and inspect stderr per-target before treating the summary as fatal."],"tags":["cli","agent","batch","summary"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}