{"record":{"id":"a96daf5e9e10bb98","repo":"jenkinsci/jenkins","slug":"this-command-is-requesting-the-remoting-mode-whic","errorCode":null,"errorMessage":"This command is requesting the -remoting mode which is no longer supported. See https://www.jenkins.io/redirect/cli-command-requires-channel","messagePattern":"This command is requesting the -remoting mode which is no longer supported\\. See https://www\\.jenkins\\.io/redirect/cli-command-requires-channel","errorType":"exception","errorClass":"AbortException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/CLICommand.java","lineNumber":338,"sourceCode":"    }\n\n    /**\n     * Get parser for this command.\n     *\n     * Exposed to be overridden by {@link hudson.cli.declarative.CLIRegisterer}.\n     * @since 1.538\n     */\n    protected CmdLineParser getCmdLineParser() {\n        ParserProperties properties = ParserProperties.defaults().withAtSyntax(ALLOW_AT_SYNTAX);\n        return new CmdLineParser(this, properties);\n    }\n\n    /**\n     * @deprecated Specific to Remoting-based protocol.\n     */\n    @Deprecated\n    public Channel checkChannel() throws AbortException {\n        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\");\n    }\n\n    /**\n     * Returns the identity of the client as determined at the CLI transport level.\n     *\n     * <p>\n     * When the CLI connection to the server is tunneled over HTTP, that HTTP connection\n     * can authenticate the client, just like any other HTTP connections to the server\n     * can authenticate the client. This method returns that information, if one is available.\n     * By generalizing it, this method returns the identity obtained at the transport-level authentication.\n     *\n     * <p>\n     * For example, imagine if the current {@link SecurityRealm} is doing Kerberos authentication,\n     * then this method can return a valid identity of the client.\n     *\n     * <p>\n     * If the transport doesn't do authentication, this method returns {@link jenkins.model.Jenkins#ANONYMOUS2}.\n     * @since 2.266","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/CLICommand.java#L320-L356","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","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()."],"exampleFix":"// before (deprecated, always throws):\n//   @Override protected int run() throws Exception {\n//       Channel ch = checkChannel();   // -> AbortException\n//       ch.call(new MyCallable());\n//       return 0;\n//   }\n//\n// after: do the work directly in the controller (HTTP CLI already runs in-process)\n//   @Override protected int run() throws Exception {\n//       Jenkins j = Jenkins.get();\n//       // operate on jenkins model objects directly, no Channel needed\n//       return 0;\n//   }","handlingStrategy":"validation","validationCode":"// checkChannel() is @Deprecated and ALWAYS throws; never call it.\n// Before shipping a CLI command, ensure run() does not reference checkChannel():\n// grep -rn \"checkChannel\" plugin/src  // should return nothing","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["jenkins","cli","remoting","deprecated","migration"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}