apache/seatunnel · error

Open scanner result from {} is null.

Error message

Open scanner result from {} is null.

What it means

BackendClient.openScanner sends TScanOpenParams to the Doris BE and expects a TScanOpenResult. When the RPC returns null after all retries it logs this warning each attempt; ultimately openScanner throws DorisConnectorException (following the logged CONNECT_FAILED_MESSAGE error). A null result means the Thrift call completed without exception but yielded no payload, an unexpected BE response.

Source

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

    /**
     * Open a scanner for reading Doris data.
     *
     * @param openParams thrift struct to required by request
     * @return scan open result
     * @throws DorisConnectorException throw if cannot connect to Doris BE
     */
    public TScanOpenResult openScanner(TScanOpenParams openParams) {
        log.debug("OpenScanner to '{}', parameter is '{}'.", routing, openParams);
        if (!isConnected) {
            open();
        }
        TException ex = null;
        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);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check Doris BE logs (be.INFO/be.out) for errors at the corresponding time.
  2. Confirm connector and Doris versions are compatible; upgrade the connector if BE was upgraded.
  3. Retry the job — transient BE restarts often resolve themselves.
  4. Reduce tablet/batch size to lower BE load if errors correlate with load.
  5. If persistent, validate tablet health (ADMIN SHOW REPLICA STATUS) and repair bad replicas.
Defensive patterns

Strategy: retry

Validate before calling

// verify BE health and version before reading
// SHOW BACKENDS; -- Alive=true, HealthyNum matches
// check be.INFO for errors around job start

Try / catch

try {
    scanner.open();
} catch (DorisConnectorException e) {
    // openScanner exhausted retries; inspect BE logs, confirm protocol compatibility, then retry with backoff
}

Prevention

When it happens

Trigger: client.openScanner(openParams) returns null on every retry attempt in the loop — typically a BE-side fault returning an empty response, or an incompatibility between the connector's Doris thrift protocol version and the BE version.

Common situations: Doris BE version older/newer than the connector expects; BE overloaded or restarting mid-query; corrupted tablet causing BE to return malformed/empty responses; protocol mismatch after Doris upgrade.

Understand the failure class

Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.

Related errors


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