apache/cassandra · error · BulkLoadException
Streaming to the following hosts failed:
Error message
Streaming to the following hosts failed:
What it means
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.
Source
Thrown at tools/sstableloader/src/org/apache/cassandra/tools/BulkLoader.java:124
try
{
future.get();
if (!options.noProgress)
{
indicator.printSummary(options.connectionsPerHost);
}
// Give sockets time to gracefully close
Thread.sleep(1000);
}
catch (Exception e)
{
System.err.println("Streaming to the following hosts failed:");
System.err.println(loader.getFailedHosts());
e.printStackTrace(System.err);
throw new BulkLoadException(e);
}
}
// Return true when everything is at 100%
static class ProgressIndicator implements StreamEventHandler
{
private final long start;
private long lastProgress;
private long lastTime;
private long peak = 0;
private int totalFiles = 0;
private final Multimap<InetSocketAddress, SessionInfo> sessionsByHost = HashMultimap.create();
public ProgressIndicator()
{
start = lastTime = nanoTime();View on GitHub (pinned to 88fd0f6a0e)
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
Defensive patterns
Strategy: retry
Validate before calling
// before load: ensure all target hosts are up and the schema exists
for (String h : nodes.split(",")) new Socket(h.trim(), nativePort).close();
// session.execute("DESCRIBE KEYSPACE " + ks); // confirm keyspace exists Try / catch
try {
loader.load(options);
} catch (BulkLoadException e) {
System.err.println("failed hosts: " + e.getMessage());
// sstableloader is idempotent — safe to re-run after fixing the failing hosts
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- The channel this output stream was writing to has been close
- This output stream is in an unsafe state after an asynchrono
- failed to connect to %s for streaming data
- Can not start range streaming as all candidates (%s) are dow
- Unable to initialise %s
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/7a31dc5ec0925f2a.
Report an issue: GitHub.