{"record":{"id":"cacb3e0f967d7358","repo":"apache/cassandra","slug":"move-in-progress-for-another-token-s-inprogress","errorCode":null,"errorMessage":"Move in progress for another token(s) ${inProgressTokens}.","messagePattern":"Move in progress for another token\\(s\\) (.+?)\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/CMSOfflineTool.java","lineNumber":538,"sourceCode":"\n            Move moveInProgress = (Move) multiStepOperation;\n            Collection<Token> inProgressTokens = moveInProgress.tokens;\n            Collection<Token> givenTokenSet;\n            if (token == null)\n            {\n                givenTokenSet = Set.of();\n            }\n            else\n            {\n                metadata.partitioner.getTokenFactory().validate(token);\n                givenTokenSet = Set.of(metadata.partitioner.getTokenFactory().fromString(token));\n            }\n            if (givenTokenSet.isEmpty() || new HashSet<>(moveInProgress.tokens).equals(givenTokenSet))\n            {\n                return moveInProgress.applyTo(metadata).success().metadata;\n            }\n\n            throw new IllegalArgumentException(\"Move in progress for another token(s) \" + inProgressTokens + '.');\n        }\n    }\n\n    /**\n     * Identifies a target node using either its IP address or its integer/UUID node ID.\n     * Exactly one of {@code -ip} or {@code -id} must be provided.\n     */\n    static class NodeIdentifierOption\n    {\n        @Option(names = { \"-ip\", \"--ip-address\" }, required = true,\n        description = \"IP address of the target endpoint. Port can be optionally specified \" +\n                      \"using a colon after the IP address (e.g., 127.0.0.1:9042).\")\n        private String ip;\n\n        @Option(names = { \"-id\", \"--node-id\" }, required = true,\n        description = \"Node ID. It can be integer ID assigned to node or the node uuid.\")\n        private String id;\n","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/CMSOfflineTool.java#L520-L556","documentation":"When resuming a MOVE, the --token argument must match the token(s) of the MOVE already in progress. If the given token set is non-empty and differs from moveInProgress.tokens, the tool throws this IllegalArgumentException listing the tokens the ongoing move actually targets.","triggerScenarios":"finishInProgressSequence (via updatedMetadata) with a non-empty givenTokenSet that is not equal to new HashSet<>(moveInProgress.tokens).","commonSituations":"Operator forgot which token the interrupted move targeted and supplies a different one; copy-paste of a token from another node or an old command line.","solutions":["Re-run without --token so the tool resumes the in-progress MOVE with its own tokens.","Supply the exact token(s) reported in this error message (inProgressTokens).","Inspect the in-progress MOVE sequence state to see its tokens before retrying."],"exampleFix":"// before\nbin/cms move -ip 10.0.0.5 --token 1111   // move in progress for [2222]\n// after\nbin/cms move -ip 10.0.0.5 --token 2222   // matches in-progress move","handlingStrategy":"validation","validationCode":"MultiStepOperation<?> op = meta.inProgressSequences.get(nodeId);\nif (op instanceof Move && token != null && !((Move) op).tokens.equals(Set.of(parsedToken)))\n    throw new IllegalArgumentException(\"Token mismatch; move in progress for \" + ((Move) op).tokens);","typeGuard":null,"tryCatchPattern":"try { tool.move(nodeId, token); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Move in progress for another token\")) { resumeWithoutTokenOrUseListedTokens(); } else throw e; }","preventionTips":["Omit --token when resuming an in-progress move so the tool uses the stored tokens.","Record the token of any interrupted move in operational logs.","Copy the exact tokens from the error message when they must be supplied explicitly."],"tags":["token-mismatch","move-in-progress","resume","cms"],"backgroundTag":"invalid-argument-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}