apache/seatunnel · warning

http post response failed. statusCode

Error message

http post response failed. statusCode: {}

What it means

WARN logged by sendCheckColumnHttpPostRequest when the HTTP POST to the Doris FE (used by columnExists to check whether a column already exists) returns a non-expected status code. The method then falls through and returns false, meaning 'column does not exist', which can cause a redundant or failing ADD COLUMN. Root cause is an HTTP-level failure talking to Doris FE.

Solutions

  1. Check the logged statusCode and the FE HTTP endpoint (fe:http-port, typically 8030) in DorisSinkConfig
  2. Verify FE is reachable: curl the FE REST endpoint from the SeaTunnel node
  3. Check Doris FE credentials (user/password) are correct — auth failures surface as non-200 here
  4. Inspect Doris FE logs for the corresponding rejected request
  5. If the check is a false negative, verify the column manually and decide whether the ADD COLUMN should run

Example fix

// before
} else {
    log.warn("http post response failed. statusCode: {}", statusCode);
}
// after
} else {
    throw new IOException("http post response failed. statusCode: " + statusCode + ", SQL:" + sql);
}
Defensive patterns

Strategy: validation

Validate before calling

// preflight the FE REST endpoint
curl -u user:password http://feHost:8030/api/show_meta_info --fail || exit 1

Try / catch

if (resp.statusCode() != 200) {
    throw new IOException("Doris FE HTTP " + resp.statusCode());
}

Prevention

When it happens

Trigger: columnExists(event) sends a POST with a query SQL to the FE HTTP endpoint (host:port from DorisSinkConfig); the response status code is not 200/expected (bad FE address, wrong port, auth rejected, FE proxying error), hitting the else branch that logs this message.

Common situations: Wrong doris FE http port in config (e.g. 8030 vs query port); FE behind a load balancer returning 401/404; cluster down or DNS failure; REST API endpoint changed between Doris versions.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/schema/SchemaChangeManager.java:361

        try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
            CloseableHttpResponse response = httpclient.execute(httpPost);
            final int statusCode = response.getStatusLine().getStatusCode();
            if (statusCode == 200 && response.getEntity() != null) {
                String loadResult = EntityUtils.toString(response.getEntity());
                log.info(
                        "http post response success. statusCode: {}, loadResult: {}",
                        statusCode,
                        loadResult);
                JsonNode responseNode = objectMapper.readTree(loadResult);
                String code = responseNode.get("code").asText("-1");
                if (code.equals("0")) {
                    JsonNode data = responseNode.get("data").get("data");
                    if (!data.isEmpty()) {
                        return true;
                    }
                }
            } else {
                log.warn("http post response failed. statusCode: {}", statusCode);
            }
        } catch (Exception e) {
            log.error(
                    "send http post request error {}, default return false, SQL:{}",
                    e.getMessage(),
                    sql);
            log.error(e.getMessage(), e);
        }
        return false;
    }

    public HttpPost buildHttpPost(String ddl, String database)
            throws IllegalArgumentException, IOException {
        Map<String, String> param = new HashMap<>();
        param.put("stmt", ddl);
        List<String> feNodes = Arrays.asList(dorisSinkConfig.getFrontends().split(","));
        Collections.shuffle(feNodes);
        String requestUrl = String.format(SCHEMA_CHANGE_API, feNodes.get(0), database);

View on GitHub (pinned to cf67b549a7)