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

  1. Check the underlying cause in the stack trace and the node's system.log.
  2. Verify JMX connectivity: `nodetool status` works, correct -h/-p/JMX port and credentials.
  3. 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

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


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)