apache/cassandra · error · java.lang.RuntimeException
Error occurred during status-auto-compaction
Error message
Error occurred during status-auto-compaction
What it means
nodetool statusautocompaction wraps any IOException from querying the node's auto-compaction status via NodeProbe/JMX into a RuntimeException with the message 'Error occurred during status-auto-compaction'. The real failure is in the cause (connection, MBean, or server-side error).
Solutions
- Check the underlying cause in the stack trace and the node's system.log.
- Verify JMX connectivity: `nodetool status` works, correct -h/-p/JMX port and credentials.
- Confirm the keyspace/table arguments exist; retry once the node is healthy.
Example fix
// before nodetool statusautocompaction # generic RuntimeException // after nodetool statusautocompaction 2>&1 | grep -B2 -A10 'Caused by' # inspect root cause first
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check: ensure JMX reachable, e.g. run `nodetool status` and check exit code before statusautocompaction
Try / catch
try { probe.statusAutoCompaction(ks); } catch (RuntimeException e) { if (e.getMessage().startsWith("Error occurred during status-auto-compaction")) { inspectCause(e.getCause()); verifyJmx(); } else throw e; } Prevention
- Validate JMX port/credentials in monitoring scripts
- Run statusautocompaction only on healthy nodes
- Check node logs when the wrapped exception appears
When it happens
Trigger: JMX connection failure, the StorageService MBean being unavailable, or a server-side IOException while listing compaction status for the requested keyspaces/tables.
Common situations: Running against a node with JMX not started or firewalled, wrong JMX credentials/port, or a node in a degraded state during rolling upgrades.
Related errors
- Error occurred during compaction
- Error occurred during compaction keys
- Error occurred during enabling auto-compaction
- Error occurred during user defined compaction
- Aborted garbage collection for at least one table in…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/e41efa65df960177.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/nodetool/StatusAutoCompaction.java:85
Map<String, Boolean> statuses = probe.getAutoCompactionDisabled(keyspace, tableNames);
for (Map.Entry<String, Boolean> status : statuses.entrySet())
{
String tableName = status.getKey();
boolean disabled = status.getValue();
allDisabled &= disabled;
allEnabled &= !disabled;
table.add(keyspace, tableName, !disabled ? "running" : "not running");
}
}
if (showAll)
table.printTo(probe.output().out);
else
probe.output().out.println(allEnabled ? "running" :
allDisabled ? "not running" : "partially running");
}
catch (IOException e)
{
throw new RuntimeException("Error occurred during status-auto-compaction", e);
}
}
}
View on GitHub (pinned to 88fd0f6a0e)