{"record":{"id":"e9df41dd92160d0d","repo":"apache/cassandra","slug":"discovered-existing-bootstrap-data-and-s-is-not-c","errorCode":null,"errorMessage":"Discovered existing bootstrap data and %s is not configured; aborting bootstrap. Please clean up local files manually and try again or set cassandra.reset_bootstrap_progress=true to ignore. Found: %s. Fully available: %s. Transiently available: %s","messagePattern":"Discovered existing bootstrap data and (.+?) is not configured; aborting bootstrap\\. Please clean up local files manually and try again or set cassandra\\.reset_bootstrap_progress=true to ignore\\. Found: (.+?)\\. Fully available: (.+?)\\. Transiently available: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/dht/RangeStreamer.java","lineNumber":742,"sourceCode":"                        return true;\n                    };\n\n                    remaining = fetchReplicas.stream().filter(not(isAvailable)).collect(Collectors.toList());\n\n                    if (remaining.size() < available.full.size() + available.trans.size())\n                    {\n                        // If the operator hasn't specified what to do when we discover a previous partially successful bootstrap,\n                        // we error out and tell them to manually reconcile it. See CASSANDRA-17679.\n                        if (!RESET_BOOTSTRAP_PROGRESS.isPresent())\n                        {\n                            List<FetchReplica> skipped = fetchReplicas.stream().filter(isAvailable).collect(Collectors.toList());\n                            String msg = String.format(\"Discovered existing bootstrap data and %s \" +\n                                                       \"is not configured; aborting bootstrap. Please clean up local files manually \" +\n                                                       \"and try again or set cassandra.reset_bootstrap_progress=true to ignore. \" +\n                                                       \"Found: %s. Fully available: %s. Transiently available: %s\",\n                                                       RESET_BOOTSTRAP_PROGRESS.getKey(), skipped, available.full, available.trans);\n                            logger.error(msg);\n                            throw new IllegalStateException(msg);\n                        }\n\n                        if (!RESET_BOOTSTRAP_PROGRESS.getBoolean())\n                        {\n                            List<FetchReplica> skipped = fetchReplicas.stream().filter(isAvailable).collect(Collectors.toList());\n                            logger.info(\"Some ranges of {} are already available. Skipping streaming those ranges. Skipping {}. Fully available {} Transiently available {}\",\n                                        fetchReplicas, skipped, available.full, available.trans);\n                        }\n                    }\n                }\n\n                if (logger.isTraceEnabled())\n                    logger.trace(\"{}ing from {} ranges {}\", description, source, StringUtils.join(remaining, \", \"));\n\n                InetAddressAndPort self = FBUtilities.getBroadcastAddressAndPort();\n                RangesAtEndpoint full = remaining.stream()\n                                                 .filter(pair -> pair.remote.isFull())\n                                                 .map(pair -> pair.local)","sourceCodeStart":724,"sourceCodeEnd":760,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/dht/RangeStreamer.java#L724-L760","documentation":"During bootstrap streaming, RangeStreamer detects existing bootstrap data on local disk while the cassandra.reset_bootstrap_progress flag is not set. To avoid silently mixing incomplete SSTables with new streams, it aborts the bootstrap with this IllegalStateException and asks the operator to either clean the files or set the flag to ignore the previous progress.","triggerScenarios":"Calling fetchAsync during bootstrap when skipped/reused ranges are found available locally and RESET_BOOTSTRAP_PROGRESS=false; typically after a previously interrupted bootstrap attempt.","commonSituations":"A bootstrap that failed midway leaves partial SSTables in data directories; operator restarts the node and bootstrap reruns; node was never fully decommissioned before re-adding.","solutions":["Set -Dcassandra.reset_bootstrap_progress=true (system property) on the node and restart so stale bootstrap progress is ignored","Clean the data directories of the affected keyspaces (remove partial SSTables) and restart bootstrap","If the node was previously bootstrapped successfully, remove it from the cluster (nodetool decommission) before re-adding","Back up data files before deleting them"],"exampleFix":"// before\nbin/cassandra\n// ERROR: Discovered existing bootstrap data and cassandra.reset_bootstrap_progress is not configured...\n// after\nbin/cassandra -Dcassandra.reset_bootstrap_progress=true\n// or: wipe partial data first\nrm -rf /var/lib/cassandra/data/*/*(partial bootstrap sstables) && bin/cassandra","handlingStrategy":"fallback","validationCode":"// before restart, inspect data dirs for leftover bootstrap sstables\nls /var/lib/cassandra/data/*/*/ | wc -l  # unexpected files from failed bootstrap?","typeGuard":null,"tryCatchPattern":"try {\n    streamer.fetchAsync(...).get();\n} catch (ExecutionException e) {\n    if (e.getCause().getMessage().contains(\"reset_bootstrap_progress\")) {\n        // either wipe partial data dirs or restart with -Dcassandra.reset_bootstrap_progress=true\n    }\n}","preventionTips":["Always complete or properly decommission interrupted bootstraps before re-adding a node","Back up data directories before retrying bootstrap","Document cassandra.reset_bootstrap_progress in ops runbooks","Verify data dirs are clean on newly provisioned nodes"],"tags":["bootstrap","streaming","disk-state"],"backgroundTag":"bootstrap-progress-conflict","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"}