{"record":{"id":"80412e92425a20a8","repo":"risingwavelabs/risingwave","slug":"failed-connection","errorCode":null,"errorMessage":"Failed connection {:?},{:?}","messagePattern":"Failed connection (.+?),(.+?)","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/doris_starrocks_connector.rs","lineNumber":312,"sourceCode":"                .send()\n                .await\n                .map_err(|err| SinkError::DorisStarrocksConnect(anyhow!(err)))?;\n            let status = response.status();\n            let raw = response\n                .bytes()\n                .await\n                .map_err(|err| SinkError::DorisStarrocksConnect(anyhow!(err)))?\n                .into();\n\n            if status == StatusCode::OK {\n                Ok(raw)\n            } else {\n                let response_body = String::from_utf8(raw).map_err(|err| {\n                    SinkError::DorisStarrocksConnect(\n                        anyhow!(err).context(\"failed to parse response body\"),\n                    )\n                })?;\n                Err(SinkError::DorisStarrocksConnect(anyhow!(\n                    \"Failed connection {:?},{:?}\",\n                    status,\n                    response_body\n                )))\n            }\n        });\n        Ok(InserterInner::new(\n            sender,\n            handle,\n            self.stream_load_http_timeout,\n        ))\n    }\n}\n\ntype Sender = UnboundedSender<Bytes>;\n\npub struct InserterInner {\n    sender: Option<Sender>,","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/doris_starrocks_connector.rs#L294-L330","documentation":"The BE responded to the stream-load PUT with a status other than 200 OK, so the sink aborts the connection and reports the status plus the decoded response body. This is the primary error for any failed stream-load handshake during `build()`; the body usually contains Doris/StarRocks' own error JSON explaining why the load was rejected.","triggerScenarios":"`build()`'s spawned request to the BE completes with any non-200 status: 401/407 (auth), 404 (wrong db/table path), 307 loop, 5xx (BE overload/ internal error), or connection closed early.","commonSituations":"Wrong username/password or missing Basic auth headers; database or table doesn't exist; BE http_port misconfigured; table schema/column mismatch causing load rejection; BE temporarily down.","solutions":["Read the response body in the error message — Doris/StarRocks includes a JSON `Status` field with the real reason","Verify credentials and auth headers in the sink `header` config","Confirm the target database/table exists and column names match the sink schema","Check `SHOW BACKENDS;` and BE http_port reachability from RisingWave","Retry if the status is 5xx — BE may have been transiently overloaded"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-check table & connectivity before sinking\ncurl -s -u \"$USER:$PASS\" -H \"label:probe\" \\\n  -H \"column_separator:,\" -T empty.csv \\\n  http://fe-host:8030/api/db/table/_stream_load | jq -r .Status","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"Failed connection\") => {\n        // parse status and body from message; retry on 5xx, fix auth/schema on 4xx\n    }\n    r => r?,\n}","preventionTips":["Validate sink credentials and headers against a manual stream-load curl first","Ensure target database/table exist and the sink schema matches table columns","Monitor BE health (`SHOW BACKENDS;`) and retry transient 5xx loads"],"tags":["network","sink","doris","http-error","stream-load"],"backgroundTag":"http-error-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"}