apache/cassandra · error · RuntimeException
Exception occured while executing
Error message
Exception occured while executing %s: %s
What it means
SnapshotManager.executeTask wraps any Throwable thrown by a snapshot task after prePopulateSnapshots into a RuntimeException prefixed 'Exception occured while executing'. The original exception is attached as the cause; the message summarizes the task and its message.
Solutions
- Inspect the chained 'Caused by' exception; this message is only a wrapper and the root cause dictates the fix.
- Fix the underlying task failure (e.g. correct the older_than_timestamp format, free disk space, resolve permissions).
- Retry the snapshot operation once the underlying cause is resolved.
- If the cause is a prePopulateSnapshots conflict, use a unique snapshot tag or remove the existing snapshot first.
Example fix
// before
} catch (Throwable t) {
log.error(t.getMessage()); // loses root cause
}
// after
} catch (RuntimeException t) {
log.error("snapshot task failed", t.getCause());
} Defensive patterns
Strategy: try-catch
Try / catch
try { SnapshotManager.instance.clearSnapshot(tag, ks); } catch (RuntimeException e) { log.error("Snapshot task failed: {}", e.getCause(), e); } Prevention
- Always log the full exception, not just getMessage()
- Validate snapshot parameters before invoking tasks
- Fix root causes rather than retrying blindly
When it happens
Trigger: Any AbstractSnapshotTask whose call() throws — e.g. an inner ClearSnapshotTask failing because older_than_timestamp is invalid, or a take/clear snapshot hitting IO errors — propagates through this wrapper.
Common situations: JMX/nodetool snapshot operations failing due to disk errors, invalid parameters, or concurrent snapshot conflicts; users see the wrapper message and must look at the cause.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Exception occured while executing
- Error while loading snapshots from
- can not take ephemeral snapshot
- Cannot snapshot until bootstrap completes
- Cannot take a snapshot on secondary index or invalid column…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/78743a9c05cb4de5.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/snapshot/SnapshotManager.java:543
else if (notification instanceof TablePreScrubNotification)
{
ColumnFamilyStore cfs = ((TablePreScrubNotification) notification).cfs;
SnapshotOptions opts = SnapshotOptions.systemSnapshot(cfs.name, SnapshotType.PRE_SCRUB, cfs.getKeyspaceTableName()).build();
takeSnapshot(opts);
}
}
@VisibleForTesting
List<TableSnapshot> executeTask(TakeSnapshotTask task)
{
try
{
prePopulateSnapshots(task);
return task.call();
}
catch (Throwable t)
{
throw new RuntimeException(String.format("Exception occured while executing %s: %s", task.toString(), t.getMessage()), t);
}
}
@VisibleForTesting
<T> T executeTask(AbstractSnapshotTask<T> task)
{
try
{
return task.call();
}
catch (Throwable t)
{
throw new RuntimeException(String.format("Exception occured while executing %s", task.toString()), t);
}
}
/**
* Add table snapshots to snaphots cow list in advance in order to be sure that the snapshots to be createdView on GitHub (pinned to 88fd0f6a0e)