{"record":{"id":"e8b74c4c6b5cbebc","repo":"apache/seatunnel","slug":"open-scanner-from-failed","errorCode":null,"errorMessage":"Open scanner from {} failed.","messagePattern":"Open scanner from (.+?) failed\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java","lineNumber":153,"sourceCode":"        for (int attempt = 0; attempt < retries; ++attempt) {\n            log.debug(\"Attempt {} to openScanner {}.\", attempt, routing);\n            try {\n                TScanOpenResult result = client.openScanner(openParams);\n                if (result == null) {\n                    log.warn(\"Open scanner result from {} is null.\", routing);\n                    continue;\n                }\n                if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {\n                    log.warn(\n                            \"The status of open scanner result from {} is '{}', error message is: {}.\",\n                            routing,\n                            result.getStatus().getStatusCode(),\n                            result.getStatus().getErrorMsgs());\n                    continue;\n                }\n                return result;\n            } catch (TException e) {\n                log.warn(\"Open scanner from {} failed.\", routing, e);\n                ex = e;\n            }\n        }\n        log.error(ErrorMessages.CONNECT_FAILED_MESSAGE, routing);\n        //        throw new ConnectedFailedException(routing.toString(), ex);\n        throw new DorisConnectorException(\n                DorisConnectorErrorCode.SCAN_BATCH_FAILED, routing.toString(), ex);\n    }\n\n    /**\n     * get next row batch from Doris BE\n     *\n     * @param nextBatchParams thrift struct to required by request\n     * @return scan batch result\n     * @throws DorisConnectorException throw if cannot connect to Doris BE\n     */\n    public TScanBatchResult getNext(TScanNextBatchParams nextBatchParams) {\n        log.debug(\"GetNext to '{}', parameter is '{}'.\", routing, nextBatchParams);","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/backend/BackendClient.java#L135-L171","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the TException stack trace logged with the warning for the root cause.","Test connectivity from the SeaTunnel node to the BE routing address/port.","Increase retries or thrift timeouts in the connector options for flaky networks.","Check thrift_max_message_size on the BE and lower the read batch size (doris.request.batch-size).","Verify BE/tablet health in Doris and repair or restart affected nodes."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-check connectivity and thrift message limits\n// nc -zv <be-host> <thrift-port>\n// ensure doris.read.field.batch-size keeps requests well under thrift_max_message_size","typeGuard":null,"tryCatchPattern":"try {\n    scanner.open();\n} catch (DorisConnectorException e) {\n    // all openScanner attempts threw TException; read the logged stack trace, fix network/size/auth, retry\n}","preventionTips":["Set generous retry counts and timeouts for long scans on flaky networks.","Keep batch params small enough for the thrift max message size.","Verify Kerberos/TLS settings match the cluster when auth is enabled.","Watch BE logs for restarts/crashes during scans."],"tags":["thrift","doris","rpc","exception","retry-exhausted"],"backgroundTag":"api-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}