apache/cassandra · error · IllegalArgumentException
Either --node or --ip needs to be set
Error message
Either --node or --ip needs to be set
What it means
nodetool abortbootstrap requires identifying the bootstrap to abort by either --node (a node/host id) or --ip (endpoint address). execute() throws IllegalArgumentException when neither option was supplied.
Source
Thrown at src/java/org/apache/cassandra/tools/nodetool/AbortBootstrap.java:41
import picocli.CommandLine.Option;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.apache.commons.lang3.StringUtils.isEmpty;
@Command(name = "abortbootstrap", description = "Abort a failed bootstrap")
public class AbortBootstrap extends AbstractCommand
{
@Option(paramLabel = "node_id", names = "--node", description = "Node ID of the node that failed bootstrap")
private String nodeId = EMPTY;
@Option(paramLabel = "ip", names = "--ip", description = "IP of the node that failed bootstrap")
private String endpoint = EMPTY;
@Override
public void execute(NodeProbe probe)
{
if (isEmpty(nodeId) && isEmpty(endpoint))
throw new IllegalArgumentException("Either --node or --ip needs to be set");
if (!isEmpty(nodeId) && !isEmpty(endpoint))
throw new IllegalArgumentException("Only one of --node or --ip need to be set");
probe.abortBootstrap(nodeId, endpoint);
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Add exactly one of: nodetool abortbootstrap --node <host-id>
- Or use: nodetool abortbootstrap --ip <ip:port>
- Check your script/CI variable actually has a value before invoking nodetool
Example fix
// before nodetool abortbootstrap // after nodetool abortbootstrap --node 5f4a... (or --ip 10.0.0.5:7000)
Defensive patterns
Strategy: validation
Validate before calling
if ((nodeId == null || nodeId.isEmpty()) && (ip == null || ip.isEmpty()))
throw new IllegalArgumentException("Provide exactly one of --node or --ip"); Try / catch
try {
probe.execute(nodeId, endpoint);
} catch (IllegalArgumentException e) {
// print usage and re-run with one of --node / --ip
} Prevention
- Always pass --node or --ip explicitly
- In scripts, assert the variable is non-empty before invoking nodetool
- Never pass flags without values
When it happens
Trigger: Running 'nodetool abortbootstrap' with no flags, or with an empty string value for both --node and --ip (isEmpty checks treat EMPTY as unset).
Common situations: Forgetting the flag entirely; passing --node without a value so the field stays empty; scripting the command with a variable that resolved to empty string.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- Only one of --node or --ip need to be set
- 'nodetool bootstrap resume' is disabled.
- Node is not yet bootstrapped completely. Use nodetool to che
- Can't abort bootstrap for - it does not exist in cluster me
- Can't abort bootstrap for - it is alive
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/8a1a67ef74a533d7.
Report an issue: GitHub.