apache/seatunnel · error

Connect to doris {} failed.

Error message

Connect to doris {} failed.

What it means

BackendClient.open tries to establish a Thrift TTransport connection to a Doris BE node, iterating over retries. When all attempts fail it logs this error (CONNECT_FAILED_MESSAGE with the routing) and previously logged a warn with the exception. Notably the ConnectedFailedException throw is commented out, so failure here does not throw directly — downstream scanner operations will fail instead.

Source

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

                                new TConfiguration(),
                                routing.getHost(),
                                routing.getPort(),
                                socketTimeout,
                                connectTimeout);
                TProtocol protocol = factory.getProtocol(transport);
                client = new TDorisExternalService.Client(protocol);
                log.trace(
                        "Connect status before open transport to {} is '{}'.",
                        routing,
                        isConnected);
                if (!transport.isOpen()) {
                    transport.open();
                    isConnected = true;
                    log.info("Success connect to {}.", routing);
                    break;
                }
            } catch (TTransportException e) {
                log.warn(ErrorMessages.CONNECT_FAILED_MESSAGE, routing, e);
                ex = e;
            }
        }
        if (!isConnected) {
            log.error(ErrorMessages.CONNECT_FAILED_MESSAGE, routing);
            //            throw new ConnectedFailedException(routing.toString(), ex);
            throw new DorisConnectorException(
                    DorisConnectorErrorCode.BACKEND_CLIENT_FAILED, routing.toString(), ex);
        }
    }

    private void close() {
        log.trace("Connect status before close with '{}' is '{}'.", routing, isConnected);
        isConnected = false;
        if ((transport != null) && transport.isOpen()) {
            transport.close();
            log.info("Closed a connection to {}.", routing);
        }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify the routing/BE address and port printed in the log are reachable (telnet/nc).
  2. Check the Doris BE process status (be show backends / BE logs).
  3. Fix network/firewall rules to allow the connector host to reach the BE thrift port.
  4. Ensure FE-derived backends are healthy and registered (SHOW BACKENDS; Alive=true).
  5. Re-enable or handle the ConnectedFailedException path if you own the code so failures fail fast instead of surfacing later.
Defensive patterns

Strategy: validation

Validate before calling

// before job submission, verify BE reachability
// nc -zv <be-host> <thrift-port>  (default 9060)
// and in Doris: SHOW BACKENDS; ensure Alive=true for all nodes

Try / catch

try {
    reader.read();
} catch (DorisConnectorException e) {
    // caused by failed BackendClient.open; check routing addresses and BE health before retrying
}

Prevention

When it happens

Trigger: All retry attempts to open the Thrift transport to the BE httpPort/routing fail with TTransportException: BE host unreachable, wrong address, BE not running, firewall blocking the thrift port, or Kerberos/TLS transport issues.

Common situations: Misconfigured doris.frontend/BE addresses in the connector config; FE returns BE node that is dead; Docker/K8s network isolation; BE port (thrift internal service port, default 9060) not exposed; security settings mismatch.

Understand the failure class

Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.

Related errors


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