apache/seatunnel · critical · StarRocksConnectorException

HOST_IS_NULL

HOST_IS_NULL

Error message

None of the host in `load_url` could be connected.

What it means

Thrown by StarRocksStreamLoadVisitor.doStreamLoad() when getAvailableHost() returns null, i.e., none of the hosts configured in `load_url` respond. No Stream Load request is even attempted; the flush cannot proceed because there is no reachable StarRocks FE node.

Source

Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/client/StarRocksStreamLoadVisitor.java:103

     * Creates a visitor with explicit HTTP transport and label-state timeout for deterministic
     * boundary tests.
     */
    StarRocksStreamLoadVisitor(
            SinkConfig sinkConfig,
            TableSchema tableSchema,
            HttpHelper httpHelper,
            long labelStateTimeoutMs) {
        this.sinkConfig = sinkConfig;
        this.tableSchema = tableSchema;
        this.httpHelper = httpHelper;
        this.labelStateTimeoutMs = Math.max(1, labelStateTimeoutMs);
        checkBatchMaxBytes(sinkConfig.getBatchMaxBytes(), sinkConfig.getBatchMaxSize());
    }

    public Boolean doStreamLoad(StarRocksFlushTuple flushData) throws IOException {
        String host = getAvailableHost();
        if (null == host) {
            throw new StarRocksConnectorException(
                    StarRocksConnectorErrorCode.HOST_IS_NULL,
                    "None of the host in `load_url` could be connected.");
        }
        String loadUrl =
                new StringBuilder(host)
                        .append("/api/")
                        .append(sinkConfig.getDatabase())
                        .append("/")
                        .append(sinkConfig.getTable())
                        .append("/_stream_load")
                        .toString();
        if (LOG.isDebugEnabled()) {
            LOG.debug(
                    String.format(
                            "Start to join batch data: rows[%d] bytes[%d] label[%s].",
                            flushData.getRows().size(),
                            flushData.getBytes(),
                            flushData.getLabel()));

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify load_url lists reachable FE http (not query) ports, e.g. ["fe1:8030","fe2:8030"].
  2. Test connectivity from the SeaTunnel worker: curl http://<fe-host>:8030/api/health.
  3. Check FE process status and restart if stopped; confirm firewall rules allow worker→FE traffic.
  4. Add multiple FE hosts to load_url so a single-node failure doesn't blank the candidate list.

Example fix

// before
load_url = ["fe-host:9020"]
// after: correct http port + multiple FEs
load_url = ["fe1:8030", "fe2:8030"]
Defensive patterns

Strategy: validation

Validate before calling

// validate load_url before submitting the job
for host in load_url:
    assert telnet(host, 8030) succeeds
// e.g. curl -sf http://fe1:8030/api/bootstrap

Type guard

boolean feReachable(List<String> loadUrls) {
    return loadUrls.stream().anyMatch(u -> pingHttp(u, 3000));
}

Try / catch

try {
    sink.write(rows);
} catch (StarRocksConnectorException e) {
    if (e.getErrorCode() == StarRocksConnectorErrorCode.HOST_IS_NULL) {
        // fail fast: fix load_url/FE before replaying
    }
}

Prevention

When it happens

Trigger: getAvailableHost() probes each host in sinkConfig.getLoadUrl() and all fail to connect (connection refused/timeout); load_url is empty or malformed so no candidate host can be produced.

Common situations: Wrong http port (default 8030) in load_url; StarRocks FE down; firewall/security group blocking the SeaTunnel worker; DNS name unresolvable; load_url missing entirely from config.

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/faa0cd7c2f8cf8b2. Report an issue: GitHub.