jenkinsci/jenkins · error · AbortException
This command is requesting the -remoting mode which is no lo
Error message
This command is requesting the -remoting mode which is no longer supported. See https://www.jenkins.io/redirect/cli-command-requires-channel
What it means
`CLICommand.checkChannel()` is marked @Deprecated and unconditionally throws this AbortException. The remoting-based CLI protocol (which provided a live `Channel` to commands) was removed from Jenkins core; any command that relied on `checkChannel()` can no longer get a channel. The error is intentional and always fires when the method is called, signaling the developer/user that the command must be migrated to the HTTP-based CLI.
Source
Thrown at core/src/main/java/hudson/cli/CLICommand.java:338
}
/**
* Get parser for this command.
*
* Exposed to be overridden by {@link hudson.cli.declarative.CLIRegisterer}.
* @since 1.538
*/
protected CmdLineParser getCmdLineParser() {
ParserProperties properties = ParserProperties.defaults().withAtSyntax(ALLOW_AT_SYNTAX);
return new CmdLineParser(this, properties);
}
/**
* @deprecated Specific to Remoting-based protocol.
*/
@Deprecated
public Channel checkChannel() throws AbortException {
throw new AbortException("This command is requesting the -remoting mode which is no longer supported. See https://www.jenkins.io/redirect/cli-command-requires-channel");
}
/**
* Returns the identity of the client as determined at the CLI transport level.
*
* <p>
* When the CLI connection to the server is tunneled over HTTP, that HTTP connection
* can authenticate the client, just like any other HTTP connections to the server
* can authenticate the client. This method returns that information, if one is available.
* By generalizing it, this method returns the identity obtained at the transport-level authentication.
*
* <p>
* For example, imagine if the current {@link SecurityRealm} is doing Kerberos authentication,
* then this method can return a valid identity of the client.
*
* <p>
* If the transport doesn't do authentication, this method returns {@link jenkins.model.Jenkins#ANONYMOUS2}.
* @since 2.266View on GitHub (pinned to 2e228ff40b)
Solutions
- Migrate the command to stop using `checkChannel()`: perform the same work over HTTP/REST or Jenkins APIs that do not require a remoting Channel.
- If you control the plugin, rewrite the CLI command's run() to use `Jenkins.get()` / model APIs directly (it already runs in-controller under the HTTP CLI) instead of opening a Channel.
- Upgrade the providing plugin to a version whose CLI command no longer calls checkChannel().
Example fix
// before (deprecated, always throws):
// @Override protected int run() throws Exception {
// Channel ch = checkChannel(); // -> AbortException
// ch.call(new MyCallable());
// return 0;
// }
//
// after: do the work directly in the controller (HTTP CLI already runs in-process)
// @Override protected int run() throws Exception {
// Jenkins j = Jenkins.get();
// // operate on jenkins model objects directly, no Channel needed
// return 0;
// } Defensive patterns
Strategy: validation
Validate before calling
// checkChannel() is @Deprecated and ALWAYS throws; never call it. // Before shipping a CLI command, ensure run() does not reference checkChannel(): // grep -rn "checkChannel" plugin/src // should return nothing
Prevention
- Do not call the deprecated checkChannel() in any CLI command; remoting CLI is removed.
- Migrate plugin CLI commands to operate on Jenkins model objects directly (HTTP CLI runs in-controller).
- Build/test plugins against the target Jenkins core version to catch deprecated-API removals.
When it happens
Trigger: A CLI command subclass (often from an older plugin) calls `checkChannel()` in its `run()` method, or a user runs an old plugin-provided CLI command built against a Jenkins version that still supported -remoting. Any invocation of checkChannel() triggers it immediately.
Common situations: Running an old CLI jar or an unmigrated plugin command after upgrading Jenkins core past the remoting-CLI removal. A plugin built years ago whose command does in-JVM work over a Channel.
Related errors
- Cannot build {0} because its configuration has not been save
- Build scheduling Refused by an extension, hence not in Queue
- Error occurred while performing this command, see previous s
- DataInputStream unexpectedly returned negative integer
- Unknown public key type:
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/a96daf5e9e10bb98.
Report an issue: GitHub.