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
- Read the logged TException stack trace to identify transport vs. protocol failure.
- Lower the read batch size and/or increase timeouts and retries in connector options.
- Confirm network stability between SeaTunnel workers and the BE.
- Check BE logs and health; restart or repair failing BEs.
- 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
- Tune doris.request.batch-size and connect/read timeouts together.
- Check BE memory and avoid OOM-inducing large scans.
- Use stable network paths; investigate packet loss if errors recur.
- Align connector version with the Doris server version.
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
- Open scanner from {} failed.
- GetNext result from {} is null.
- Open scanner result from {} is null.
- CloseScanner result from {} is null.
- Close scanner from {} failed.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/0f1e2273176bc483.
Report an issue: GitHub.