{"record":{"id":"7ab8086346db21b2","repo":"risingwavelabs/risingwave","slug":"can-t-get-doris-be-url","errorCode":null,"errorMessage":"Can't get doris BE url","messagePattern":"Can't get doris BE url","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/doris_starrocks_connector.rs","lineNumber":223,"sourceCode":"                })?;\n\n                if be_host == LOCALHOST || be_host == LOCALHOST_IP {\n                    // if be host is 127.0.0.1, we may can't connect to it directly,\n                    // so replace it with fe host\n                    parsed_be_url\n                        .set_host(Some(fe_host))\n                        .map_err(|err| SinkError::DorisStarrocksConnect(anyhow!(err)))?;\n                }\n            }\n            Ok(Some(parsed_be_url))\n        }\n        StatusCode::OK => {\n            // Some of the `StarRocks` transactional APIs will respond directly from FE. For example,\n            // the request to `/api/transaction/commit` endpoint does not seem to redirect to BE.\n            // In this case, the request should be treated as finished.\n            Ok(None)\n        }\n        _ => Err(SinkError::DorisStarrocksConnect(anyhow!(\n            \"Can't get doris BE url\",\n        ))),\n    }\n}\n\npub struct InserterInnerBuilder {\n    url: String,\n    header: HashMap<String, String>,\n    #[expect(dead_code)]\n    sender: Option<Sender>,\n    fe_host: String,\n    stream_load_http_timeout: Duration,\n}\nimpl InserterInnerBuilder {\n    pub fn new(\n        url: String,\n        db: String,\n        table: String,","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/doris_starrocks_connector.rs#L205-L241","documentation":"try_get_be_url maps a successful 200 response to Ok(None) (transactional APIs answered by the FE directly). Any other status code that is not 307/200 falls through to this catch-all error, meaning the FE replied with an unexpected HTTP status and no BE URL can be extracted.","triggerScenarios":"Receiving an HTTP status other than 200 or 307 (e.g. 401 Unauthorized, 404 Not Found, 500 Internal Server Error, 502) from the Doris FE during stream load or transaction calls.","commonSituations":"Wrong user/password in the sink options (401); wrong database/table path (404); Doris FE crashed or overloaded (500/502); version-incompatible endpoints.","solutions":["Log the actual response status/body to identify whether it is auth (401), routing (404), or server (5xx).","Verify the Doris sink username, password, database, and table options.","Check Doris FE health and logs for server-side errors.","Confirm the Doris version is compatible with the connector endpoints."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match try_get_be_url(resp).await {\n    Err(SinkError::DorisStarrocksConnect(e)) if e.to_string().contains(\"Can't get doris BE url\") => {\n        // inspect status: retry on 5xx, fix credentials/route on 401/404\n        eprintln!(\"unexpected FE status: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Validate Doris credentials and db/table paths before creating the sink.","Monitor FE health; 5xx statuses surface here.","Log the HTTP status and body on sink errors for quick triage."],"tags":["rust","sink","doris","http","status-code"],"backgroundTag":"http-non-2xx-response","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}