apache/seatunnel · error · StarRocksConnectorException

FLUSH_DATA_FAILED

FLUSH_DATA_FAILED

Error message

Unable to flush data to StarRocks: unknown result status. {loadResult}

What it means

Thrown by StarRocksStreamLoadVisitor.doStreamLoad() when the Stream Load HTTP response is null or lacks the 'Status' key, so the result cannot be interpreted. Logged as 'unknown result status' with the full response body before throwing FLUSH_DATA_FAILED.

Source

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

                        .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()));
        }
        Map<String, Object> loadResult =
                httpHelper.doHttpPut(
                        loadUrl,
                        joinRows(flushData.getRows(), flushData.getBytes()),
                        getStreamLoadHttpHeader(flushData.getLabel()));
        final String keyStatus = "Status";
        if (null == loadResult || !loadResult.containsKey(keyStatus)) {
            LOG.error("unknown result status. {}", loadResult);
            throw new StarRocksConnectorException(
                    StarRocksConnectorErrorCode.FLUSH_DATA_FAILED,
                    "Unable to flush data to StarRocks: unknown result status. " + loadResult);
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug("StreamLoad response:\n" + JsonUtils.toJsonString(loadResult));
        }
        Object resultStatus = loadResult.get(keyStatus);
        if (RESULT_SUCCESS.equals(resultStatus) || RESULT_PUBLISH_TIMEOUT.equals(resultStatus)) {
            return true;
        }
        if (RESULT_LABEL_EXISTED.equals(resultStatus)) {
            LOG.debug("StreamLoad response:\n" + JsonUtils.toJsonString(loadResult));
            // The original request may already be committed, so never resend it under a new label
            // until StarRocks reports the final state of the existing label.
            checkLabelState(host, flushData.getLabel());
            return true;
        }
        if (RESULT_FAILED.equals(resultStatus)) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read the logged 'unknown result status. {...}' payload to see what the server actually returned.
  2. Check for proxies/LBs between SeaTunnel and StarRocks rewriting the response; bypass them for FE hosts.
  3. Verify StarRocks credentials and that the response is JSON (correct Content-Type handling).
  4. Upgrade/align StarRocks version if the response schema differs from expected.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    sink.write(rows);
} catch (StarRocksConnectorException e) {
    if (e.getMessage() != null && e.getMessage().contains("unknown result status")) {
        // capture the logged response body; check proxies/fe version
    }
}

Prevention

When it happens

Trigger: The HTTP helper returns null (request failed with no body) or the parsed JSON response has no 'Status' field — e.g., an FE/BE proxy returned an HTML error page, auth challenge, or non-JSON payload.

Common situations: Response intercepted by a load balancer returning HTML 502/503 pages; wrong HTTP header expectation when going through a proxy; basic-auth challenge page; StarRocks version returning a different response shape; empty body on 500 errors.

Related errors


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