apache/seatunnel · error

Failed to connect to back all address

Error message

Failed to connect to back all address

What it means

RestService.send exhausted all configured Doris FE addresses without getting a usable response. Each attempt logged a connect/IO problem (CONNECT_FAILED_MESSAGE) and after the loop it throws an exception built from the last error, surfaced as this 'Failed to connect to back all address' message. The read job cannot enumerate partitions and fails.

Source

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

                            request.getURI(),
                            statusCode);
                    continue;
                }
                logger.trace(
                        "Success get response from Doris FE: {}, response is: {}.",
                        request.getURI(),
                        response);
                // Handle the problem of inconsistent data format returned by http v1 and v2
                Map map = OBJECT_MAPPER.readValue(response, Map.class);
                if (map.containsKey("code") && map.containsKey("msg")) {
                    Object data = map.get("data");
                    return OBJECT_MAPPER.writeValueAsString(data);
                } else {
                    return response;
                }
            } catch (IOException e) {
                ex = e;
                logger.warn(ErrorMessages.CONNECT_FAILED_MESSAGE, request.getURI(), e);
            }
        }
        String errMsg =
                "Connect to "
                        + request.getURI().toString()
                        + "failed, status code is "
                        + statusCode
                        + ".";
        throw new DorisConnectorException(DorisConnectorErrorCode.REST_SERVICE_FAILED, errMsg, ex);
    }

    private static String getConnectionPost(
            HttpRequestBase request, String user, String passwd, Logger logger) throws IOException {
        URL url = new URL(request.getURI().toString());
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setInstanceFollowRedirects(false);
        conn.setRequestMethod(request.getMethod());
        String authEncoding =

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify every FE is up: curl http://<fe>:8030/api/bootstrap from the SeaTunnel node
  2. Correct the fe_nodes / nodes option to list reachable host:fe_http_port entries (comma-separated)
  3. Open firewall/security-group access from the engine nodes to FE HTTP ports
  4. Fix DNS/hosts entries so FE hostnames resolve inside the cluster
  5. Check FE logs for crashes; restart FEs if they are down

Example fix

// before
"fe_nodes" = "10.0.0.1:8030,10.0.0.2:9030" // wrong ports / dead node
// after
"fe_nodes" = "10.0.0.1:8030,10.0.0.2:8030,10.0.0.3:8030"
Defensive patterns

Strategy: retry

Validate before calling

// before submitting the job, from each engine node:
// for fe in $(echo $FE_NODES | tr ',' ' '); do curl -sf http://$fe/api/bootstrap || echo FAIL $fe; done

Try / catch

try {
    dorisSourceReader/splitEnumerator.start();
} catch (IOException | SeaTunnelException e) {
    if (e.getMessage().contains("Failed to connect to back all address")) {
        // check FE list/network, then retry with backoff
    }
}

Prevention

When it happens

Trigger: findPartitions -> send tries every FE in the request's address list; all attempts throw IOException (connection refused, timeouts, DNS failures) or return error statuses.

Common situations: All FEs down or firewall blocking the HTTP port; fe_nodes configured with wrong hostnames/ports; Kerberos/TLS mismatches; container DNS unable to resolve FE hostnames; security group rules blocking the driver host.

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