jenkinsci/jenkins · error · IllegalArgumentException
This strategy ({0}) does not exist. Allowed strategies are {
Error message
This strategy ({0}) does not exist. Allowed strategies are {1} What it means
Error "This strategy ({0}) does not exist. Allowed strategies are {1}" thrown in jenkinsci/jenkins.
Source
Thrown at core/src/main/java/hudson/cli/DisablePluginCommand.java:86
static final int RETURN_CODE_NO_SUCH_PLUGIN = 17;
@Override
protected void printUsageSummary(PrintStream stderr) {
super.printUsageSummary(stderr);
stderr.println(Messages.DisablePluginCommand_PrintUsageSummary());
}
@Override
protected int run() throws Exception {
Jenkins jenkins = Jenkins.get();
jenkins.checkPermission(Jenkins.ADMINISTER);
// get the strategy as an enum
PluginWrapper.PluginDisableStrategy strategyToUse;
try {
strategyToUse = PluginWrapper.PluginDisableStrategy.valueOf(strategy.toUpperCase());
} catch (IllegalArgumentException iae) {
throw new IllegalArgumentException(
hudson.cli.Messages.DisablePluginCommand_NoSuchStrategy(
strategy,
String.format(
"%s, %s, %s",
PluginWrapper.PluginDisableStrategy.NONE,
PluginWrapper.PluginDisableStrategy.MANDATORY,
PluginWrapper.PluginDisableStrategy.ALL)),
iae);
}
// disable...
List<PluginWrapper.PluginDisableResult> results = jenkins.pluginManager.disablePlugins(strategyToUse, pluginNames);
// print results ...
printResults(results);
// restart if it was required and it's necessary (at least one plugin was disabled in this execution)
restartIfNecessary(results);View on GitHub (pinned to 2e228ff40b)
Solutions
- Use one of the listed allowed strategy values exactly as shown.
- Run the disable-plugin command with --help to see valid strategy options.
- Omit the strategy argument to use the default behavior.
When it happens
Trigger: Raised when the disable-plugin CLI command is given a strategy argument that is not one of the allowed values (e.g. 'none', 'mandatory', 'all').
Common situations: See trigger scenarios.
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/fa8c515e28365440.
Report an issue: GitHub.