apache/cassandra · error · RuntimeException
Got error while relocating
Error message
Got error while relocating
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/tools/nodetool/RelocateSSTables.java:65
names = { "-j", "--jobs" },
description = "Number of sstables to relocate simultanously, set to 0 to use all available compaction threads")
private int jobs = 2;
@Override
public void execute(NodeProbe probe)
{
args = concatArgs(keyspace, tables);
List<String> keyspaces = parseOptionalKeyspace(args, probe);
String[] cfnames = parseOptionalTables(args);
try
{
for (String keyspace : keyspaces)
probe.relocateSSTables(jobs, keyspace, cfnames);
}
catch (Exception e)
{
throw new RuntimeException("Got error while relocating", e);
}
}
}
View on GitHub (pinned to 88fd0f6a0e)
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
Example fix
// before nodetool relocate_sstables --jobs -5 // after nodetool relocate_sstables --jobs 0
Defensive patterns
Strategy: try-catch
Validate before calling
nodetool compactionstats | head -5 # ensure node not busy before relocating
Try / catch
try { probe.relocateSSTables(jobs, ks, tables); } catch (RuntimeException e) { log.error("relocate failed: {}", e.getCause(), e); throw e; } Prevention
- Run relocation when compaction queues are drained
- Use jobs=0 for node-default throttling
- Confirm table names after topology changes
When it happens
Trigger: `nodetool relocate_sstables` (optionally with keyspace/tables/jobs) when the remote relocation request fails: invalid table names, bad jobs parameter, IO/JMX errors.
Common situations: Running after a topology/disk change with mismatched table names; concurrent cleanup/compaction operations; JMX connectivity problems.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- Failed marking some sstables compacting in keyspace %s, chec
- Error while refreshing system.size_estimates
- Unknown Cache metric name
- Unknown BufferPool metric name
- Error setting log for on level . Please check logback confi
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/77be7620c0f7a991.
Report an issue: GitHub.