apache/seatunnel · error

Open scanner from {} failed.

Error message

Open scanner from {} failed.

What it means

openScanner catches TException from the Thrift RPC, logs this warning per failed attempt, and after exhausting retries throws DorisConnectorException (the ConnectedFailedException throw is commented out) after logging CONNECT_FAILED_MESSAGE. This means the BE could not be queried to open a scan: transport-level failure, serialization failure, or an RPC error.

Source

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

        for (int attempt = 0; attempt < retries; ++attempt) {
            log.debug("Attempt {} to openScanner {}.", attempt, routing);
            try {
                TScanOpenResult result = client.openScanner(openParams);
                if (result == null) {
                    log.warn("Open scanner result from {} is null.", routing);
                    continue;
                }
                if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {
                    log.warn(
                            "The status of open scanner result from {} is '{}', error message is: {}.",
                            routing,
                            result.getStatus().getStatusCode(),
                            result.getStatus().getErrorMsgs());
                    continue;
                }
                return result;
            } catch (TException e) {
                log.warn("Open scanner from {} failed.", routing, e);
                ex = e;
            }
        }
        log.error(ErrorMessages.CONNECT_FAILED_MESSAGE, routing);
        //        throw new ConnectedFailedException(routing.toString(), ex);
        throw new DorisConnectorException(
                DorisConnectorErrorCode.SCAN_BATCH_FAILED, routing.toString(), ex);
    }

    /**
     * get next row batch from Doris BE
     *
     * @param nextBatchParams thrift struct to required by request
     * @return scan batch result
     * @throws DorisConnectorException throw if cannot connect to Doris BE
     */
    public TScanBatchResult getNext(TScanNextBatchParams nextBatchParams) {
        log.debug("GetNext to '{}', parameter is '{}'.", routing, nextBatchParams);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Inspect the TException stack trace logged with the warning for the root cause.
  2. Test connectivity from the SeaTunnel node to the BE routing address/port.
  3. Increase retries or thrift timeouts in the connector options for flaky networks.
  4. Check thrift_max_message_size on the BE and lower the read batch size (doris.request.batch-size).
  5. Verify BE/tablet health in Doris and repair or restart affected nodes.
Defensive patterns

Strategy: retry

Validate before calling

// pre-check connectivity and thrift message limits
// nc -zv <be-host> <thrift-port>
// ensure doris.read.field.batch-size keeps requests well under thrift_max_message_size

Try / catch

try {
    scanner.open();
} catch (DorisConnectorException e) {
    // all openScanner attempts threw TException; read the logged stack trace, fix network/size/auth, retry
}

Prevention

When it happens

Trigger: client.openScanner throws TException on all retries — BE unreachable from a previously-working state, thrift message size limits exceeded, BE dropping the connection mid-RPC, or protocol incompatibility.

Common situations: Long-running query where the BE restarts or fails over; network partition between the SeaTunnel node and the BE; thrift_max_message_size too small for large batch params; Kerberos/auth handshake failures.

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