apache/cassandra · error · RuntimeException
Aborted garbage collection for at least one table in…
Error message
Aborted garbage collection for at least one table in keyspace ${keyspaceName}, check server logs for more information. What it means
The public garbageCollect wrapper calls the JMX gc operation and checks the returned status code; a non-zero result means the garbage-collection (compaction) job aborted for at least one table. It prints a message and throws RuntimeException so nodetool exits with an error.
Solutions
- Check the server logs on the node for the underlying compaction abort reason
- Re-run garbagecollect after concurrent compactions have settled
- Retry per-keyspace/table to isolate which table failed
- Consider running with lower parallelism or during lower load
Example fix
// before nodetool garbagecollect keyspace1 // after (retry per table to isolate failures) nodetool garbagecollect keyspace1 table1
Defensive patterns
Strategy: retry
Try / catch
try {
probe.garbageCollect(out, tombstoneOption, jobs, ks, tableNames);
} catch (RuntimeException e) {
logger.warn("garbagecollect aborted for {} — check server logs, retrying", ks, e);
probe.garbageCollect(out, tombstoneOption, jobs, ks, tableNames);
} Prevention
- Avoid running garbagecollect concurrently with repairs or other compactions
- Retry per-table to isolate and localize failures
- Always check node server logs for the root cause
When it happens
Trigger: nodetool garbagecollect (or NodeProbe.garbageCollect) when the server-side CompactionManagerMBean.garbageCollect returns a non-zero status for at least one table in the given keyspace — typically the tombstone compaction task aborted or failed to mark SSTables.
Common situations: Concurrent compaction activity on the target tables; interrupted JMX task execution; a table in the keyspace unavailable mid-operation (e.g. being dropped or repaired).
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Aborted garbage collection for at least one table, check…
- Cannot set concurrent_validations greater than…
- compaction tombstone warning threshold needs to be >= 0, not
- Could not set new local compaction strategy
- Disabling compaction by setting min_compaction_threshold or…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/6eae7c9c007a4542.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:503
{
switch (job.perform())
{
case 1:
out.printf("Aborted %s for at least one table in keyspace %s, check server logs for more information.\n",
jobName, ks);
break;
case 2:
out.printf("Failed marking some sstables compacting in keyspace %s, check server logs for more information.\n", ks);
throw new RuntimeException(String.format("Failed marking some sstables compacting in keyspace %s, check server logs for more information.\n", ks));
}
}
public void garbageCollect(PrintStream out, String tombstoneOption, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException
{
if (garbageCollect(tombstoneOption, jobs, keyspaceName, tableNames) != 0)
{
out.println("Aborted garbage collection for at least one table in keyspace " + keyspaceName + ", check server logs for more information.");
throw new RuntimeException("Aborted garbage collection for at least one table in keyspace " + keyspaceName + ", check server logs for more information.");
}
}
public void userDefinedGarbageCollect(PrintStream out, String tombstoneOption, int jobs, List<String> userDefinedTables) throws IOException, ExecutionException, InterruptedException
{
if (userDefinedGarbageCollect(tombstoneOption, jobs, userDefinedTables) != 0)
{
out.println("Aborted garbage collection for at least one table, check server logs for more information.");
throw new RuntimeException("Aborted garbage collection for at least one table, check server logs for more information.");
}
}
public void forceUserDefinedCompaction(String datafiles) throws IOException, ExecutionException, InterruptedException
{
compactionProxy.forceUserDefinedCompaction(datafiles);
}
public void forceKeyspaceCompaction(boolean splitOutput, int parallelism, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedExceptionView on GitHub (pinned to 88fd0f6a0e)