{"record":{"id":"7a31dc5ec0925f2a","repo":"apache/cassandra","slug":"streaming-to-the-following-hosts-failed","errorCode":null,"errorMessage":"Streaming to the following hosts failed:","messagePattern":"Streaming to the following hosts failed:","errorType":"console","errorClass":"BulkLoadException","httpStatus":null,"severity":"error","filePath":"tools/sstableloader/src/org/apache/cassandra/tools/BulkLoader.java","lineNumber":124,"sourceCode":"\n        try\n        {\n            future.get();\n\n            if (!options.noProgress)\n            {\n                indicator.printSummary(options.connectionsPerHost);\n            }\n\n            // Give sockets time to gracefully close\n            Thread.sleep(1000);\n        }\n        catch (Exception e)\n        {\n            System.err.println(\"Streaming to the following hosts failed:\");\n            System.err.println(loader.getFailedHosts());\n            e.printStackTrace(System.err);\n            throw new BulkLoadException(e);\n        }\n    }\n\n    // Return true when everything is at 100%\n    static class ProgressIndicator implements StreamEventHandler\n    {\n        private final long start;\n        private long lastProgress;\n        private long lastTime;\n\n        private long peak = 0;\n        private int totalFiles = 0;\n\n        private final Multimap<InetSocketAddress, SessionInfo> sessionsByHost = HashMultimap.create();\n\n        public ProgressIndicator()\n        {\n            start = lastTime = nanoTime();","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/tools/sstableloader/src/org/apache/cassandra/tools/BulkLoader.java#L106-L142","documentation":"BulkLoader.load() throws BulkLoadException when the streaming progress handler reports that one or more target hosts failed to receive the SSTables. The failed-host list and stack trace are printed to stderr first. See tools/sstableloader/src/org/apache/cassandra/tools/BulkLoader.java:124.","triggerScenarios":"Running sstableloader where the StreamResultFuture completes with getFailedHosts() non-empty — a target node rejects or drops the stream: node down mid-stream, disk full on the receiver, schema/handshake disagreement.","commonSituations":"Loading SSTables into a cluster where a replica runs out of disk; loader/cluster version mismatch; network interruption during transfer; keyspace/table missing on the target.","solutions":["Check the printed failed-host list and inspect those nodes' logs","Verify the target keyspace/tables exist and schema matches the SSTables","Free disk space / restart failed nodes, then re-run sstableloader (safe to re-run)","Retry after network issues; ensure loader and cluster versions are compatible"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before load: ensure all target hosts are up and the schema exists\nfor (String h : nodes.split(\",\")) new Socket(h.trim(), nativePort).close();\n// session.execute(\"DESCRIBE KEYSPACE \" + ks); // confirm keyspace exists","typeGuard":null,"tryCatchPattern":"try {\n    loader.load(options);\n} catch (BulkLoadException e) {\n    System.err.println(\"failed hosts: \" + e.getMessage());\n    // sstableloader is idempotent — safe to re-run after fixing the failing hosts\n}","preventionTips":["Check disk space on all receiving nodes before large loads","Confirm keyspace/tables exist on the target before loading SSTables","Keep loader and cluster versions compatible","Re-run sstableloader after transient failures"],"tags":["streaming","sstableloader","network"],"backgroundTag":"http-request-failed","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"}