apache/cassandra · error · java.lang.RuntimeException
Error during taking a snapshot
Error message
Error during taking a snapshot
What it means
nodetool snapshot wraps any IOException from probe.takeSnapshot (the JMX call to the node) into a RuntimeException with the message 'Error during taking a snapshot', preserving the cause. It signals the snapshot operation failed server-side or the JMX communication failed.
Solutions
- Read the full stack trace and the cause; check the node's system.log for the underlying snapshot error.
- Verify the keyspaces/tables passed exist (use nodetool describering or cqlsh DESCRIBE).
- Check node disk space and permissions on the data/snapshots directories.
- Verify JMX connectivity (nodetool status works) and retry.
Example fix
// before (script ignores failure detail)
nodetool snapshot -tn daily || exit 1
// after
nodetool snapshot -tn daily 2>&1 | tee snap.log || { cat snap.log; grep -A5 'Error during taking a snapshot' snap.log; exit 1; } Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check target exists: nodetool describering / cqlsh DESCRIBE KEYSPACES, and ensure JMX is reachable before snapshotting
Try / catch
try { probe.takeSnapshot(name, table, options, keyspaces); } catch (RuntimeException e) { if (e.getMessage().equals("Error during taking a snapshot")) { log(e.getCause()); checkNodeLogsAndDisk(); } else throw e; } Prevention
- Verify keyspaces/tables exist before snapshotting
- Monitor node disk space; snapshots need no copy but hard links fail on some filesystems
- Keep JMX healthy; test with nodetool status first
When it happens
Trigger: The remote node fails while creating hard links (disk error, missing SSTable files, keyspace/table does not exist) or the JMX connection breaks mid-call.
Common situations: Snapshotting a nonexistent keyspace/table, disk-full or permission problems on the node, or flaky JMX connectivity to a busy node.
Related errors
- Argument must have keyspace and table values.
- Error during clearing snapshots
- Error during moving node
- error
- Error occured when getting the guardrails config
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/c743ea7e8cdab6a8.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/nodetool/Snapshot.java:118
else
{
if (keyspaces.isEmpty())
sb.append("[all keyspaces]");
else
sb.append('[').append(join(keyspaces, ", ")).append(']');
if (!snapshotName.isEmpty())
sb.append(" with snapshot name [").append(snapshotName).append(']');
sb.append(" and options ").append(options);
out.println(sb);
probe.takeSnapshot(snapshotName, table, options, toArray(keyspaces, String.class));
out.println("Snapshot directory: " + snapshotName);
}
}
catch (IOException e)
{
throw new RuntimeException("Error during taking a snapshot", e);
}
}
}
View on GitHub (pinned to 88fd0f6a0e)