apache/seatunnel · error

Get next from {} failed.

Error message

Get next from {} failed.

What it means

getNext catches TException from the batch RPC, logs this warning per attempt, and after retries are exhausted logs an error (DORIS_INTERNAL_FAIL_MESSAGE if the last result status was not OK, otherwise CONNECT_FAILED_MESSAGE) and throws. This signals the stream of scan batches from the BE could not continue due to a transport/RPC failure.

Source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java:195

        for (int attempt = 0; attempt < retries; ++attempt) {
            log.debug("Attempt {} to getNext {}.", attempt, routing);
            try {
                result = client.getNext(nextBatchParams);
                if (result == null) {
                    log.warn("GetNext result from {} is null.", routing);
                    continue;
                }
                if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {
                    log.warn(
                            "The status of get next result from {} is '{}', error message is: {}.",
                            routing,
                            result.getStatus().getStatusCode(),
                            result.getStatus().getErrorMsgs());
                    continue;
                }
                return result;
            } catch (TException e) {
                log.warn("Get next from {} failed.", routing, e);
                ex = e;
            }
        }
        if (result != null && (TStatusCode.OK != (result.getStatus().getStatusCode()))) {
            log.error(
                    ErrorMessages.DORIS_INTERNAL_FAIL_MESSAGE,
                    routing,
                    result.getStatus().getStatusCode(),
                    result.getStatus().getErrorMsgs());
            //            throw new DorisInternalException(routing.toString(),
            // result.getStatus().getStatusCode(),
            //                    result.getStatus().getErrorMsgs());
            String errMsg =
                    "Doris server "
                            + routing.toString()
                            + " internal failed, status code ["
                            + result.getStatus().getStatusCode()
                            + "] error message is "

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read the logged TException stack trace to identify transport vs. protocol failure.
  2. Lower the read batch size and/or increase timeouts and retries in connector options.
  3. Confirm network stability between SeaTunnel workers and the BE.
  4. Check BE logs and health; restart or repair failing BEs.
  5. Upgrade connector to match the Doris server version if protocol errors appear.
Defensive patterns

Strategy: retry

Validate before calling

// keep thrift payload within limits: batch size * row size < thrift_max_message_size
// verify network stability from workers to BE before long jobs

Try / catch

try {
    batch = scanner.getNext();
} catch (DorisConnectorException e) {
    // all attempts threw TException; inspect logged stack trace for transport vs protocol cause, adjust size/timeout, retry
}

Prevention

When it happens

Trigger: client.getNext throws TException on every retry — connection dropped mid-stream, thrift deserialization failure on a large batch, BE crash, or timeout exceeded.

Common situations: Network instability during large table reads; batch responses exceeding thrift message size limits; BE OOM/crash under heavy scans; Doris upgrade restarting nodes mid-read.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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