apache/cassandra · error · RuntimeException

Failed to transfer all hints to

Error message

Failed to transfer all hints to 

What it means

The DispatchTask (Major/DispatchTask in HintsDispatchExecutor) throws RuntimeException("Failed to transfer all hints to <hostId>") after logging an error when transfer(hostId) returns false — i.e., not all hint files for the target could be delivered (e.g., the target is not caught up, a hints file failed to send, or the session failed). This is an internal retryable failure surfaced on the dispatch thread.

Solutions

  1. Ensure the target node is up and reachable (nodetool status, check gossip/Networking connections), then retry transfer.
  2. Retry the transfer — dispatch is retried automatically with backoff for regular handoff; for manual transferhints rerun the command.
  3. Check for messaging errors/timeouts in logs and fix network/TLS issues between nodes.
  4. If hints are stale beyond max_hint_window_in_ms, they will be dropped; run a repair (nodetool repair) to converge data instead.

Example fix

# before
nodetool transferhints -- <target-ip>   # fails mid-transfer
# after
# ensure target is UP first, then retry
nodetool status | grep <target-ip>
nodetool transferhints -- <target-ip>   # retry until transfer() completes
# alternatively rely on automatic hinted-handoff retries and repair
Defensive patterns

Strategy: retry

Validate before calling

// before manual transfer, confirm target reachability
if (!MessagingService.instance().getVersion(targetAddress).isKnown() || !Gossiper.instance.isAlive(targetAddress))
    throw new IllegalStateException("target not alive");

Try / catch

try { nodetool transferhints(target); } catch (RuntimeException e) { scheduleRetryWithBackoff(target); }

Prevention

When it happens

Trigger: nodetool transferhints / hinted handoff dispatch when the target node is unreachable mid-transfer, a hints file fails to send over the internode messaging connection, or transfer() exhausts its attempt while some stores/files remain undelivered.

Common situations: Target node down or flapping during transfer; network partitions or timeouts between DCs; large hint backlogs that hit connection timeouts; transferring hints to a hostId that was replaced/unknown to the local catalog.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java:192

                return;

            logger.warn("Failed to transfer all hints to {}: {}; will retry in {} seconds", address, hostId, 10);

            try
            {
                TimeUnit.SECONDS.sleep(10);
            }
            catch (InterruptedException e)
            {
                throw new UncheckedInterruptedException(e);
            }

            hostId = hostIdSupplier.get();
            logger.info("Transferring all hints to {}: {}", address, hostId);
            if (!transfer(hostId))
            {
                logger.error("Failed to transfer all hints to {}: {}", address, hostId);
                throw new RuntimeException("Failed to transfer all hints to " + hostId);
            }
        }

        private boolean transfer(UUID hostId)
        {
            catalog.stores()
                   .map(store -> new DispatchHintsTask(store, hostId, true))
                   .forEach(Runnable::run);

            return !catalog.hasFiles();
        }
    }

    private final class DispatchHintsTask implements Runnable
    {
        private final HintsStore store;
        private final UUID hostId;
        private final RateLimiter rateLimiter;

View on GitHub (pinned to 88fd0f6a0e)