apache/seatunnel · critical · DorisConnectorException

SHOULD_NEVER_HAPPEN

SHOULD_NEVER_HAPPEN

Error message

No Doris stream load node initialized.

What it means

initializeStreamLoad loops over candidate Doris nodes attempting to start data/control stream loads; if every candidate fails, it throws a DorisConnectorException with code SHOULD_NEVER_HAPPEN stating 'No Doris stream load node initialized.' It signals that no FE/BE endpoint could be used for the load.

Source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:393

                if (abortPreCommitOnInit) {
                    streamLoad.abortPreCommit(labelPrefix, lastCheckpointId + 1);
                }
                return new InitializedStreamLoad(node, streamLoad);
            } catch (Exception e) {
                closeStreamLoadQuietly(streamLoad, nodeType + " node " + node);
                if (i == nodeCount - 1) {
                    log.error("All {} {} nodes failed, no more nodes to try", nodeCount, nodeType);
                    throw new DorisConnectorException(
                            DorisConnectorErrorCode.STREAM_LOAD_FAILED, e);
                }
                log.error(
                        "stream load error for {} node: {} with exception: {}",
                        nodeType,
                        node,
                        e.getMessage());
            }
        }
        throw new DorisConnectorException(
                DorisConnectorErrorCode.SHOULD_NEVER_HAPPEN,
                "No Doris stream load node initialized.");
    }

    private void cleanupInitializedStreamLoads(
            DorisStreamLoad dataStreamLoad, DorisStreamLoad cleanupControlStreamLoad) {
        closeStreamLoadQuietly(dataStreamLoad, "data stream load");
        if (cleanupControlStreamLoad != dataStreamLoad) {
            closeStreamLoadQuietly(cleanupControlStreamLoad, "control stream load");
        }
        scheduledExecutorService.shutdownNow();
    }

    private void closeStreamLoadQuietly(DorisStreamLoad streamLoad, String streamLoadName) {
        if (streamLoad == null) {
            return;
        }
        try {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify fe.nodes, fe.http-port and credentials are correct and reachable (curl the FE REST endpoint)
  2. Check BE node status (SHOW BACKENDS) and that BE http (webserver) ports are open
  3. Test with direct_to_be=true / benodes config if FE redirect handling is problematic
  4. Inspect the per-node logged exceptions above the throw to see why each candidate failed

Example fix

// before
Doris {
  fe.nodes = "doris-fe:8030"
}
// after
Doris {
  fe.nodes = "doris-fe-0.doris-fe-headless:8030,doris-fe-1.doris-fe-headless:8030"
}
Defensive patterns

Strategy: retry

Validate before calling

// preflight: FE reachable?
curl -u user:pass http://doris-fe:8030/api/bootstrap
// BE reachable?
curl http://doris-be:8040/api/health

Try / catch

try { writer.close(); } catch (DorisConnectorException e) { if (e.getErrorCode() == DorisConnectorErrorCode.SHOULD_NEVER_HAPPEN) { /* no node usable: alert ops */ } throw e; }

Prevention

When it happens

Trigger: All candidate nodes (from fe.nodes config or discovered BE nodes) failed startLoad in controlHandle/dataHandle paths — connection refused, auth failure, or unexpected HTTP errors for every node.

Common situations: Wrong or unreachable fe.nodes config; all BEs down; firewall blocking http_port/webserver_port; DNS misconfiguration; cluster paused/scaled to zero.

Understand the failure class

Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/31dfb7b5477ea206. Report an issue: GitHub.