{"record":{"id":"acc3003c0459d8ba","repo":"apache/seatunnel","slug":"schema-change-failed","errorCode":"SCHEMA_CHANGE_FAILED","errorMessage":"Failed to schemaChange, status: <statusCode>, reason: <reasonPhrase>","messagePattern":"Failed to schemaChange, status: <statusCode>, reason: <reasonPhrase>","errorType":"error_code","errorClass":"DorisSchemaChangeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/schema/SchemaChangeManager.java","lineNumber":403,"sourceCode":"        httpPost.setEntity(\n                new StringEntity(objectMapper.writeValueAsString(param), charsetEncoding));\n        return httpPost;\n    }\n\n    private String handleResponse(HttpUriRequest request) {\n        try (CloseableHttpClient httpclient = HttpClients.createDefault()) {\n            CloseableHttpResponse response = httpclient.execute(request);\n            final int statusCode = response.getStatusLine().getStatusCode();\n            final String reasonPhrase = response.getStatusLine().getReasonPhrase();\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                return loadResult;\n            } else {\n                throw new DorisSchemaChangeException(\n                        DorisConnectorErrorCode.SCHEMA_CHANGE_FAILED,\n                        \"Failed to schemaChange, status: \"\n                                + statusCode\n                                + \", reason: \"\n                                + reasonPhrase);\n            }\n        } catch (Exception e) {\n            log.error(\"SchemaChange request error,\", e);\n            throw new DorisSchemaChangeException(\n                    DorisConnectorErrorCode.SCHEMA_CHANGE_FAILED,\n                    \"SchemaChange request error with \" + e.getMessage());\n        }\n    }\n\n    private String authHeader() {\n        return \"Basic \"\n                + new String(\n                        Base64.encodeBase64(","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/schema/SchemaChangeManager.java#L385-L421","documentation":"handleResponse throws DorisSchemaChangeException with code SCHEMA_CHANGE_FAILED when the FE's HTTP response to a DDL request has a non-success status code. It surfaces the raw status code and reason phrase so the caller can diagnose the FE-side rejection of the schema change.","triggerScenarios":"Doris FE returns HTTP 4xx/5xx for the ALTER request: bad auth credentials, malformed DDL rejected at HTTP layer, FE down/overloaded, wrong FE host/port in the sink config, or FE proxy returning an error page.","commonSituations":"Wrong `base-url`/FE http port (default 8030) in Doris sink config; FE authentication failures; cluster under load; DDL blocked by FE (e.g. table locked by another schema change).","solutions":["Verify the FE host and HTTP port in the sink config and that FE is reachable (curl the FE endpoint)","Check FE master status and fe.log for the reason the request failed","Confirm Doris username/password have ALTER privileges on the target table","Retry after the cluster finishes any in-progress schema change"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before job: curl -u user:pass http://fe-host:8030/api/show_meta_info to verify FE reachability","typeGuard":null,"tryCatchPattern":"try {\n    manager.executeThenReturnResponse(ddl, db);\n} catch (DorisSchemaChangeException e) {\n    if (e.getErrorCode() == DorisConnectorErrorCode.SCHEMA_CHANGE_FAILED)\n        log.error(\"FE rejected schema change: {}\", e.getMessage());\n}","preventionTips":["Verify FE host/port and credentials in sink config","Grant the Doris user ALTER privileges","Monitor FE health and avoid concurrent schema changes on the same table"],"tags":["http","doris","schema-change","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-14T05:17:10.506Z"}