{"record":{"id":"77be7620c0f7a991","repo":"apache/cassandra","slug":"got-error-while-relocating","errorCode":null,"errorMessage":"Got error while relocating","messagePattern":"Got error while relocating","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/nodetool/RelocateSSTables.java","lineNumber":65,"sourceCode":"            names = { \"-j\", \"--jobs\" },\n            description = \"Number of sstables to relocate simultanously, set to 0 to use all available compaction threads\")\n    private int jobs = 2;\n\n    @Override\n    public void execute(NodeProbe probe)\n    {\n        args = concatArgs(keyspace, tables);\n\n        List<String> keyspaces = parseOptionalKeyspace(args, probe);\n        String[] cfnames = parseOptionalTables(args);\n        try\n        {\n            for (String keyspace : keyspaces)\n                probe.relocateSSTables(jobs, keyspace, cfnames);\n        }\n        catch (Exception e)\n        {\n            throw new RuntimeException(\"Got error while relocating\", e);\n        }\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":69,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/RelocateSSTables.java#L47-L69","documentation":"Nodetool RelocateSSTables wraps any exception from the JMX relocateSSTables call in a RuntimeException 'Got error while relocating'. Relocation moves SSTables between nodes/disks without streaming; the failure is node-side and surfaced via the wrapped cause.","triggerScenarios":"`nodetool relocate_sstables` (optionally with keyspace/tables/jobs) when the remote relocation request fails: invalid table names, bad jobs parameter, IO/JMX errors.","commonSituations":"Running after a topology/disk change with mismatched table names; concurrent cleanup/compaction operations; JMX connectivity problems.","solutions":["Inspect the wrapped cause and node logs","Verify keyspace/table names","Check for conflicting compaction/cleanup activity (`nodetool compactionstats`)","Retry with jobs=0 once the node is idle"],"exampleFix":"// before\nnodetool relocate_sstables --jobs -5\n// after\nnodetool relocate_sstables --jobs 0","handlingStrategy":"try-catch","validationCode":"nodetool compactionstats | head -5  # ensure node not busy before relocating","typeGuard":null,"tryCatchPattern":"try { probe.relocateSSTables(jobs, ks, tables); } catch (RuntimeException e) { log.error(\"relocate failed: {}\", e.getCause(), e); throw e; }","preventionTips":["Run relocation when compaction queues are drained","Use jobs=0 for node-default throttling","Confirm table names after topology changes"],"tags":["nodetool","sstables","jmx"],"backgroundTag":"api-request-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}