{"record":{"id":"bd54c2b88ff38ea0","repo":"apache/cassandra","slug":"error-verifying-s-s","errorCode":null,"errorMessage":"Error verifying %s: %s","messagePattern":"Error verifying (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/StandaloneVerifier.java","lineNumber":139,"sourceCode":"                }\n            }\n            IVerifier.Options verifyOptions = IVerifier.options().invokeDiskFailurePolicy(false)\n                                                       .extendedVerification(options.extended)\n                                                       .checkVersion(options.checkVersion)\n                                                       .mutateRepairStatus(options.mutateRepairStatus)\n                                                       .checkOwnsTokens(!options.tokens.isEmpty())\n                                                       .tokenLookup(ignore -> options.tokens)\n                                                       .build();\n            handler.output(\"Running verifier with the following options: \" + verifyOptions);\n            for (SSTableReader sstable : sstables)\n            {\n                try (IVerifier verifier = sstable.getVerifier(cfs, handler, true, verifyOptions))\n                {\n                    verifier.verify();\n                }\n                catch (Exception e)\n                {\n                    handler.warn(e, String.format(\"Error verifying %s: %s\", sstable, e.getMessage()));\n                    hasFailed = true;\n                }\n            }\n\n            CompactionManager.instance.finishCompactionsAndShutdown(5, TimeUnit.MINUTES);\n\n            for (SSTableReader reader : sstables)\n                Throwables.perform((Throwable) null, () -> reader.selfRef().close());\n\n            exitCode = hasFailed ? 1 : 0; // We need that to stop non daemonized threads\n        }\n        catch (Exception e)\n        {\n            System.err.println(e.getMessage());\n            if (options.debug)\n                e.printStackTrace(System.err);\n            exitCode = 1;\n        }","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/StandaloneVerifier.java#L121-L157","documentation":"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.","triggerScenarios":"Running sstablesverify against an sstable that is corrupt, has mismatched summaries/indexes, checksum failures, unreadable data files, or missing components during offline verification.","commonSituations":"Disk corruption or bad sectors; crashed writes leaving partial sstables; restoring backups incompletely; running verification on files being concurrently written by a live node.","solutions":["Stop Cassandra (verify offline) or ensure the sstable is not being compacted before re-running verification.","Run nodetool scrub (or sstables scrub) on the table to repair or discard corrupt sstables.","Restore the affected sstable from a validated backup if scrub cannot recover it.","Check filesystem/disk health (dmesg, smartctl) for underlying hardware errors.","If data is lost after scrub, restore from snapshots and run nodetool repair to re-sync replicas."],"exampleFix":"// 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","handlingStrategy":"validation","validationCode":"// 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); }","typeGuard":null,"tryCatchPattern":"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 }","preventionTips":["Always run verification offline (node stopped or table quiesced).","Schedule regular scrub/verify to catch corruption early.","Validate backups before restoring them into production.","Monitor disk health (SMART) to catch hardware-induced corruption.","Never point the verifier at sstables still being written."],"tags":["sstable","offline-tools","corruption","verification"],"backgroundTag":"checksum-mismatch","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}