{"record":{"id":"13c476a26b3f5172","repo":"apache/seatunnel","slug":"http-post-response-failed-statuscode","errorCode":null,"errorMessage":"http post response failed. statusCode: {}","messagePattern":"http post response failed\\. statusCode: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/schema/SchemaChangeManager.java","lineNumber":361,"sourceCode":"        try (CloseableHttpClient httpclient = HttpClients.createDefault()) {\n            CloseableHttpResponse response = httpclient.execute(httpPost);\n            final int statusCode = response.getStatusLine().getStatusCode();\n            if (statusCode == 200 && response.getEntity() != null) {\n                String loadResult = EntityUtils.toString(response.getEntity());\n                log.info(\n                        \"http post response success. statusCode: {}, loadResult: {}\",\n                        statusCode,\n                        loadResult);\n                JsonNode responseNode = objectMapper.readTree(loadResult);\n                String code = responseNode.get(\"code\").asText(\"-1\");\n                if (code.equals(\"0\")) {\n                    JsonNode data = responseNode.get(\"data\").get(\"data\");\n                    if (!data.isEmpty()) {\n                        return true;\n                    }\n                }\n            } else {\n                log.warn(\"http post response failed. statusCode: {}\", statusCode);\n            }\n        } catch (Exception e) {\n            log.error(\n                    \"send http post request error {}, default return false, SQL:{}\",\n                    e.getMessage(),\n                    sql);\n            log.error(e.getMessage(), e);\n        }\n        return false;\n    }\n\n    public HttpPost buildHttpPost(String ddl, String database)\n            throws IllegalArgumentException, IOException {\n        Map<String, String> param = new HashMap<>();\n        param.put(\"stmt\", ddl);\n        List<String> feNodes = Arrays.asList(dorisSinkConfig.getFrontends().split(\",\"));\n        Collections.shuffle(feNodes);\n        String requestUrl = String.format(SCHEMA_CHANGE_API, feNodes.get(0), database);","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/schema/SchemaChangeManager.java#L343-L379","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the logged statusCode and the FE HTTP endpoint (fe:http-port, typically 8030) in DorisSinkConfig","Verify FE is reachable: curl the FE REST endpoint from the SeaTunnel node","Check Doris FE credentials (user/password) are correct — auth failures surface as non-200 here","Inspect Doris FE logs for the corresponding rejected request","If the check is a false negative, verify the column manually and decide whether the ADD COLUMN should run"],"exampleFix":"// before\n} else {\n    log.warn(\"http post response failed. statusCode: {}\", statusCode);\n}\n// after\n} else {\n    throw new IOException(\"http post response failed. statusCode: \" + statusCode + \", SQL:\" + sql);\n}","handlingStrategy":"validation","validationCode":"// preflight the FE REST endpoint\ncurl -u user:password http://feHost:8030/api/show_meta_info --fail || exit 1","typeGuard":null,"tryCatchPattern":"if (resp.statusCode() != 200) {\n    throw new IOException(\"Doris FE HTTP \" + resp.statusCode());\n}","preventionTips":["Use FE http_port (8030) not the MySQL port (9030) in config","Verify FE reachability from the SeaTunnel node with curl","Check FE credentials and grants for the REST API"],"tags":["doris","http","rest-api","network"],"backgroundTag":"http-error-response","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}