apache/seatunnel · error

failed to stream load data with label:

Error message

failed to stream load data with label: 

What it means

DorisStreamLoad.startStreamLoad wraps the actual stream-load HTTP PUT in a try/catch; on any exception it builds 'failed to stream load data with label: <label>', logs it as a warning, and rethrows the original exception. The message identifies the failing stream-load label so you can correlate with Doris-side load state.

Source

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

                    .addProperties(streamLoadProp);
            if (enable2PC) {
                putBuilder.enable2PC();
            }
            pendingLoadFuture =
                    executorService.submit(
                            () -> {
                                log.info("start execute load");
                                return HttpUtil.executeWithRedirectTracking(
                                        streamLoadHttpClient,
                                        putBuilder.build(),
                                        loadUrlStr,
                                        directToBe,
                                        enable2PC,
                                        "stream-load-write");
                            });
        } catch (Exception e) {
            String err = "failed to stream load data with label: " + label;
            log.warn(err, e);
            throw e;
        }
    }

    public void abortTransaction(long txnID) throws Exception {
        HttpPutBuilder builder = new HttpPutBuilder();
        builder.setUrl(abortUrlStr)
                .baseAuth(user, passwd)
                .addCommonHeader()
                .addTxnId(txnID)
                .setEmptyEntity()
                .abort();
        CloseableHttpResponse response =
                HttpUtil.executeWithRedirectTracking(
                        httpClient, builder.build(), abortUrlStr, directToBe, enable2PC, "abort");

        int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode == HTTP_TEMPORARY_REDIRECT) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read the rethrown cause below the warning — it carries the real HTTP/network error
  2. Verify Doris FE/BE endpoints, credentials, and that the target database/table exist
  3. Check label state in Doris (`show stream load`) to see if the load partially succeeded
  4. Ensure network/firewall allows the client to follow the FE redirect to the BE

Example fix

null
Defensive patterns

Strategy: retry

Validate before calling

// Preconditions before write
assert tablePath != null && !tablePath.isEmpty();
assert dorisOptions.getUser() != null && dorisOptions.getPassword() != null;
// Optionally ping FE: new HttpGet("http://" + feHost + "/api/health")

Try / catch

try { streamLoad.startStreamLoad(label, rowBytes); } catch (Exception e) { log.error("stream load label {} failed: {}", label, e.getMessage()); if (isRetryable(e)) retryWithNewLabel(); else throw e; }

Prevention

When it happens

Trigger: Any exception thrown by the underlying HTTP execute of the stream-load PUT inside startStreamLoad (called from writeRecord): connection failures, HTTP error responses, auth failures, redirect problems, or serialization errors before/while sending the record batch.

Common situations: Doris FE/BE unreachable or wrong `load_url`/host config; 401/307 handling failures; TLS misconfig; record payload exceeding limits; firewall blocking the redirect to the BE.

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


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