jenkinsci/jenkins · error · AbortException

Error occurred while performing this command, see previous s

Error message

Error occurred while performing this command, see previous stderr output.

What it means

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).

Source

Thrown at core/src/main/java/hudson/cli/OfflineNodeCommand.java:89

                    String adv = EditDistance.findNearest(node_s, names);
                    throw new IllegalArgumentException(adv == null ?
                            hudson.model.Messages.Computer_NoSuchSlaveExistsWithoutAdvice(node_s) :
                            hudson.model.Messages.Computer_NoSuchSlaveExists(node_s, adv));
                }
                computer.cliOffline(cause);
            } catch (Exception e) {
                if (hs.size() == 1) {
                    throw e;
                }

                stderr.println(node_s + ": " + e.getMessage());
                errorOccurred = true;
                continue;
            }
        }

        if (errorOccurred) {
            throw new AbortException(CLI_LISTPARAM_SUMMARY_ERROR_TEXT);
        }
        return 0;
    }
}

View on GitHub (pinned to 2e228ff40b)

Solutions

  1. Read the preceding stderr lines: each failing node was printed as `<node>: <message>`.
  2. Remove or fix the failing node and re-run.
  3. Validate the whole list against getComputers() before invoking.
Defensive patterns

Strategy: validation

Validate before calling

Set<String> known = Jenkins.get().getComputers().stream()
    .map(c -> c.getName()).collect(Collectors.toSet());
List<String> valid = nodes.stream().filter(known::contains).toList();

Try / catch

try {
    int rc = cli.execute(args);
} catch (AbortException e) {
    if (CLI_LISTPARAM_SUMMARY_ERROR_TEXT.equals(e.getMessage())) {
        // partial failure: parse prior stderr lines for the failing node
    }
}

Prevention

When it happens

Trigger: `offline-node a b c` where at least one of a/b/c does not exist or its cliOffline(cause) throws.

Common situations: Batch scripts that fan out offline-node over a node list containing stale or transient agents.

Related errors


AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14). Data as JSON: /api/errors/e763dce6b52c81f3. Report an issue: GitHub.