alibaba/DataX · error · IOException
Unable to flush data to Doris: unknown result status.
Error message
Unable to flush data to Doris: unknown result status.
What it means
DorisStreamLoadObserver.streamLoad throws this IOException when the stream load HTTP call succeeds but the parsed response JSON lacks the 'Status' key (or the response map is null), so the observer cannot determine whether Doris committed the batch. The full response is logged just before (LOG.info "StreamLoad response") for comparison.
Source
Thrown at doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisStreamLoadObserver.java:68
public void streamLoad(WriterTuple data) throws Exception {
String host = getLoadHost();
if(host == null){
throw new IOException ("load_url cannot be empty, or the host cannot connect.Please check your configuration.");
}
String loadUrl = new StringBuilder(host)
.append("/api/")
.append(options.getDatabase())
.append("/")
.append(options.getTable())
.append("/_stream_load")
.toString();
LOG.info("Start to join batch data: rows[{}] bytes[{}] label[{}].", data.getRows().size(), data.getBytes(), data.getLabel());
Map<String, Object> loadResult = put(loadUrl, data.getLabel(), addRows(data.getRows(), data.getBytes().intValue()));
LOG.info("StreamLoad response :{}",JSON.toJSONString(loadResult));
final String keyStatus = "Status";
if (null == loadResult || !loadResult.containsKey(keyStatus)) {
throw new IOException("Unable to flush data to Doris: unknown result status.");
}
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult));
if (RESULT_FAILED.equals(loadResult.get(keyStatus))) {
throw new IOException(
new StringBuilder("Failed to flush data to Doris.\n").append(JSON.toJSONString(loadResult)).toString()
);
} else if (RESULT_LABEL_EXISTED.equals(loadResult.get(keyStatus))) {
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult));
checkStreamLoadState(host, data.getLabel());
}
}
private void checkStreamLoadState(String host, String label) throws IOException {
int idx = 0;
while(true) {
try {
TimeUnit.SECONDS.sleep(Math.min(++idx, 5));
} catch (InterruptedException ex) {View on GitHub (pinned to 80ec23d5c5)
Solutions
- Check the preceding log line 'StreamLoad response :{...}' to see the actual body received.
- Verify username/password in the writer config are correct and the FE accepts them (curl with the same basic auth).
- Bypass any HTTP proxy/LB and point loadUrl directly at FE hosts.
- Confirm the Doris version supports the stream load response contract this plugin expects (Status key).
Example fix
// before: loadUrl behind an LB that returns HTML -> no Status key "loadUrl": ["doris-lb:8030"] // after "loadUrl": ["fe1:8030", "fe2:8030"]
Defensive patterns
Strategy: try-catch
Try / catch
try { observer.streamLoad(tuple); } catch (IOException e) { if (e.getMessage().contains("unknown result status")) { /* inspect logged 'StreamLoad response' JSON; check auth/proxy; retry once against a direct FE */ } throw e; } Prevention
- Point loadUrl directly at FE hosts; keep auth credentials validated at job start.
- Pin the Doris version range supported by your doriswriter build and test after FE upgrades.
When it happens
Trigger: Doris returns an unexpected body — an HTML login/error page from a proxy, an auth failure response, an old Doris version with a different JSON schema, or a redirect body — so JSON.toJSONString(loadResult) has no Status field. A null result map from put() also triggers it.
Common situations: A gateway/LB in front of the FE rewriting responses, username/password not set so the FE responds with an unauthorized page, or Doris version mismatch where /api/.../_stream_load response keys changed. Rare relative to explicit FAIL statuses.
Related errors
- Failed to create row serializer, unsupported `format` from s
- load_url cannot be empty, or the host cannot connect.Please
- Failed to flush data to Doris. %s
- Failed to flush data to Doris, Error could not get the final
- Failed to parse delimiter: `Hex str is empty`
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/479ad48031ec0b7b.
Report an issue: GitHub.