apache/cassandra · error · IllegalArgumentException

Need to give either a token for a new move operation, or…

Error message

Need to give either a token for a new move operation, or --resume/--abort for an existing one

What it means

Nodetool 'move' requires either a new token to move the node to, or --resume/--abort to operate on an existing pending move. If no token argument is given and --resume was not passed, execute() throws this IllegalArgumentException to stop the invocation. It is a pure client-side argument-validation error before any JMX call.

Solutions

  1. Pass the target token: `nodetool move <new_token>`
  2. If resuming an interrupted move, pass `--resume`
  3. If aborting a failed move, use `nodetool abortmove` (or `move --abort` where supported)
  4. Check `nodetool help move` for the exact argument order

Example fix

// before
nodetool move
// after
nodetool move 8500565963494345642
Defensive patterns

Strategy: validation

Validate before calling

if [ -z "$TOKEN" ] && [ "$RESUME" != "1" ]; then echo "usage: nodetool move <token> | --resume"; exit 2; fi
nodetool move "$TOKEN"

Prevention

When it happens

Trigger: Running `nodetool move` with no token argument and without --resume (e.g. only --abort would pass since abort is handled earlier; only a bare `nodetool move` or `nodetool move --some-unrelated-flag` lands here).

Common situations: Operators forget the token argument when scripting moves; copy-pasting an example where the token placeholder was empty; assuming --resume is implied after a failed move.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/27c89e15f29183fc. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/tools/nodetool/Move.java:53

    @Option(description = "Resume an ongoing move operation", names = { "--resume" })
    private boolean resume;

    @Override
    public void execute(NodeProbe probe)
    {
        try
        {
            if (!newToken.isEmpty())
            {
                probe.move(newToken);
            }
            else
            {
                if (resume)
                    probe.resumeMove();
                else
                    throw new IllegalArgumentException("Need to give either a token for a new move operation, or --resume/--abort for an existing one");
            }
        } catch (IOException e)
        {
            throw new RuntimeException("Error during moving node", e);
        }
    }

    @Command(name = "abortmove", description = "Abort a failed move operation for this or a remote node")
    public static class Abort extends AbstractCommand
    {
        @Option(paramLabel = "nodeId", names = { "--node" })
        private String nodeId;

        @Override
        public void execute(NodeProbe probe)
        {
            probe.abortMove(nodeId);
        }

View on GitHub (pinned to 88fd0f6a0e)