apache/cassandra · error · IllegalArgumentException
Replication factor should not be set if previous operation i
Error message
Replication factor should not be set if previous operation is resumed
What it means
nodetool cms takes --resume to continue a previously interrupted CMS reconfiguration. execute() throws IllegalArgumentException when extra positional args (replication factors) are passed along with --resume, since a resumed operation already carries its own target RF.
Source
Thrown at src/java/org/apache/cassandra/tools/nodetool/CMSAdmin.java:150
{
if (status)
{
Map<String, List<String>> status = probe.getCMSOperationsProxy().reconfigureCMSStatus();
if (status == null)
{
output.out.println("No active reconfiguration");
}
else
{
for (Map.Entry<String, List<String>> e : status.entrySet())
output.out.printf("%s: %s%n", e.getKey(), e.getValue());
}
return;
}
if (resume)
{
if (!args.isEmpty())
throw new IllegalArgumentException("Replication factor should not be set if previous operation is resumed");
probe.getCMSOperationsProxy().resumeReconfigureCms();
return;
}
if (cancel)
{
probe.getCMSOperationsProxy().cancelReconfigureCms();
return;
}
if (args.isEmpty())
throw new IllegalArgumentException("Replication factor is empty");
Map<String, Integer> parsedRfs = new HashMap<>(args.size());
for (String rf : args)
{
if (!rf.contains(":"))View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Call 'nodetool cms --resume' with no positional args
- If you want to change the RF, start a fresh reconfiguration with the RF args instead of resuming
- Cancel the stuck reconfiguration first (cms --cancel), then invoke cms with the new RF
Example fix
// before nodetool cms --resume 3 // after nodetool cms --resume
Defensive patterns
Strategy: validation
Validate before calling
if (resume && rfArgs.size() > 0)
throw new IllegalArgumentException("--resume takes no RF arguments; omit them or start a fresh reconfigure"); Prevention
- --resume never takes positional args
- To change RF, run cms with RF args (no --resume)
- Cancel before reconfiguring with new RF
When it happens
Trigger: Running 'nodetool cms --resume rf1=x' or 'nodetool cms --resume <dc>:3' — resume combined with any replication factor arguments.
Common situations: Script building a cms command with args always appended; operator resuming after editing the RF args expecting them to apply; copy-pasting a full 'cms --rf' command and adding --resume.
Related errors
- Replication factor is empty
- Simple placement can only specify a single replication facto
- Can not parse replication factor from %s
- Cannot combine -dc and -hosts options.
- You need to run primary range repair on all nodes in the clu
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/d353c946e17fb036.
Report an issue: GitHub.