apache/cassandra · error · RuntimeException
Failed verifying SSTable <descriptor>
Error message
Failed verifying SSTable <descriptor>
What it means
SSTableImporter wraps any Throwable raised while verifying an SSTable descriptor (reading metadata/components in the import directory) in a RuntimeException 'Failed verifying SSTable <descriptor>' and aborts the import. It signals the SSTable could not be validated, e.g., corrupt, unreadable, or incompatible files.
Source
Thrown at src/java/org/apache/cassandra/db/SSTableImporter.java:149
table));
}
}
}
if (options.verifySSTables || options.verifyTokens)
verifySSTableForImport(descriptor, entry.getValue(), options.verifyTokens, options.verifySSTables, options.extendedVerify);
}
catch (Throwable t)
{
if (dir != null)
{
logger.error("[{}] Failed verifying SSTable {} in directory {}", importID, descriptor, dir, t);
failedDirectories.add(dir);
}
else
{
logger.error("[{}] Failed verifying SSTable {}", importID, descriptor, t);
throw new RuntimeException("Failed verifying SSTable " + descriptor, t);
}
break;
}
}
}
}
}
Set<SSTableReader> newSSTables = new HashSet<>();
for (Pair<Directories.SSTableLister, String> listerPair : listers)
{
Directories.SSTableLister lister = listerPair.left;
String dir = listerPair.right;
if (failedDirectories.contains(dir))
continue;
Set<MovedSSTable> movedSSTables = new HashSet<>();
Set<SSTableReader> newSSTablesPerDirectory = new HashSet<>();View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Re-copy the SSTable set completely and verify checksums (e.g., rsync with --checksum) before importing
- Confirm the source SSTables come from the same Cassandra major version and matching schema
- Check filesystem permissions and disk health on the import directory; fix and retry
- If a specific directory is bad, remove the offending SSTable from the import directory (or mark the directory as failed) and import the rest
Example fix
// before: partially copied SSTable rsync -a src/ /data/import/ # interrupted, truncated files // after: complete, verified copy rsync -a --checksum --delete src/ /data/import/ && nodetool import -- ks table /data/import
Defensive patterns
Strategy: validation
Validate before calling
// verify components exist and checksums match before import
for (String f : requiredComponents(descriptor)) {
File file = new File(importDir, f);
if (!file.canRead()) throw new IOException("missing/unreadable component: " + f);
verifyChecksum(file, checksums.get(f));
} Try / catch
try {
nodetool("import", "--", ks, table, dir);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Failed verifying SSTable")) {
// re-copy the offending SSTable from a healthy source, then retry
reCopySstable(dir);
nodetool("import", "--", ks, table, dir);
}
} Prevention
- Use rsync --checksum or verified copy tools when staging SSTables
- Never copy from a source mid-compaction; use nodetool snapshot
- Keep source and destination Cassandra versions/schema compatible
- Check disk health (dmesg/SMART) when verification repeatedly fails
When it happens
Trigger: importNewSSTables calls SSTableReader validation on a descriptor in the import directory and it throws (corrupt data file, missing required components, unreadable directory, wrong schema/version), and the directory is not one of the designated failedDirectories being handled.
Common situations: Copying SSTables mid-compaction leaving inconsistent components; truncated data files from an interrupted scp/rsync; importing SSTables from an incompatible Cassandra version; wrong file permissions on the import directory.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Can't import sstable <descriptor>
- Failed to import sstable <filename>
- is corrupt, can't import
- Invalid SSTable %s, please force %srepair
- Failed to read partition index
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/92bf424f04b71154.
Report an issue: GitHub.