apache/cassandra · error

Error verifying %s: %s

Error message

Error verifying %s: %s

What it means

StandaloneVerifier (offline sstablesverify) catches any Exception thrown while verifying an sstable, logs 'Error verifying <sstable>: <message>' via the IVerifier handler, and marks hasFailed. It means the given sstable failed corruption/consistency verification, not that the tool crashed.

Source

Thrown at src/java/org/apache/cassandra/tools/StandaloneVerifier.java:139

                }
            }
            IVerifier.Options verifyOptions = IVerifier.options().invokeDiskFailurePolicy(false)
                                                       .extendedVerification(options.extended)
                                                       .checkVersion(options.checkVersion)
                                                       .mutateRepairStatus(options.mutateRepairStatus)
                                                       .checkOwnsTokens(!options.tokens.isEmpty())
                                                       .tokenLookup(ignore -> options.tokens)
                                                       .build();
            handler.output("Running verifier with the following options: " + verifyOptions);
            for (SSTableReader sstable : sstables)
            {
                try (IVerifier verifier = sstable.getVerifier(cfs, handler, true, verifyOptions))
                {
                    verifier.verify();
                }
                catch (Exception e)
                {
                    handler.warn(e, String.format("Error verifying %s: %s", sstable, e.getMessage()));
                    hasFailed = true;
                }
            }

            CompactionManager.instance.finishCompactionsAndShutdown(5, TimeUnit.MINUTES);

            for (SSTableReader reader : sstables)
                Throwables.perform((Throwable) null, () -> reader.selfRef().close());

            exitCode = hasFailed ? 1 : 0; // We need that to stop non daemonized threads
        }
        catch (Exception e)
        {
            System.err.println(e.getMessage());
            if (options.debug)
                e.printStackTrace(System.err);
            exitCode = 1;
        }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Stop Cassandra (verify offline) or ensure the sstable is not being compacted before re-running verification.
  2. Run nodetool scrub (or sstables scrub) on the table to repair or discard corrupt sstables.
  3. Restore the affected sstable from a validated backup if scrub cannot recover it.
  4. Check filesystem/disk health (dmesg, smartctl) for underlying hardware errors.
  5. If data is lost after scrub, restore from snapshots and run nodetool repair to re-sync replicas.

Example fix

// before: verifying while node runs -> concurrent modification errors: sstablesverify keyspace table // after: run offline with node stopped, then scrub if verification fails: nodetool drain && stop cassandra; sstablesverify keyspace table || sstables scrub keyspace table
Defensive patterns

Strategy: validation

Validate before calling

// ensure sstable files are complete and not being written before offline verify: for (String comp : components) { File f = new File(descriptor, comp); if (!f.exists() || f.length() == 0) throw new IOException("incomplete sstable component " + comp); }

Try / catch

try { verifier.verify(); } catch (Exception e) { logger.error("Sstable {} failed verification: {}", sstable, e.getMessage()); // route to scrub/backup restore instead of assuming data is fine }

Prevention

When it happens

Trigger: Running sstablesverify against an sstable that is corrupt, has mismatched summaries/indexes, checksum failures, unreadable data files, or missing components during offline verification.

Common situations: Disk corruption or bad sectors; crashed writes leaving partial sstables; restoring backups incompletely; running verification on files being concurrently written by a live node.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/bd54c2b88ff38ea0. Report an issue: GitHub.