apache/seatunnel · critical · DorisConnectorException
STREAM_LOAD_FAILED
STREAM_LOAD_FAILED
Error message
stream load redirect not followed: HTTP/1.1 307 Temporary Redirect, request=<requestUrl>, Location=<location>, direct_to_be=<directToBe>, 2pc=<enable2PC>, stage=commit. Please check BE reachability, FE load, and consider benodes + direct_to_be=true when FE redirect is unstable.
What it means
DorisCommitter.commitTransaction treats an HTTP 307 Temporary Redirect at commit stage as fatal because the HTTP client is configured not to follow redirects. The exception (built by DorisRedirectExceptionBuilder) includes the request URL, Location header, direct_to_be flag and 2PC flag, hinting that the BE is unreachable via the redirect or that FE redirect behavior is unstable.
Source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/committer/DorisCommitter.java:135
dorisSinkConfig.getEnable2PC(),
"commit");
} catch (DorisConnectorException e) {
lastRedirectException = e;
log.error("commit transaction redirect follow-up failed on {}: ", hostPort, e);
sleepBeforeNextAttempt(attempt);
continue;
} catch (IOException e) {
lastIOException = e;
log.error("commit transaction failed on {}: ", hostPort, e);
sleepBeforeNextAttempt(attempt);
continue;
}
try (CloseableHttpResponse closeableResponse = response) {
int statusCode = closeableResponse.getStatusLine().getStatusCode();
reasonPhrase = closeableResponse.getStatusLine().getReasonPhrase();
if (statusCode == HTTP_TEMPORARY_REDIRECT) {
Header location = closeableResponse.getFirstHeader("Location");
throw new DorisConnectorException(
DorisConnectorErrorCode.STREAM_LOAD_FAILED,
DorisRedirectExceptionBuilder.build(
requestUrl,
location == null ? null : location.getValue(),
dorisSinkConfig.isDirectToBe(),
dorisSinkConfig.getEnable2PC(),
"commit"));
}
if (statusCode != HTTP_OK) {
log.warn("commit failed with {}, reason {}", hostPort, reasonPhrase);
sleepBeforeNextAttempt(attempt);
continue;
}
handleCommitSuccess(committable, hostPort, closeableResponse);
return;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set `direct_to_be = true` in the Doris sink config to send stream-load directly to BE and skip FE redirects
- Make FE-advertised BE addresses reachable (configure be http port, priority_networks, or DNS/hosts entries)
- Use `benodes` option listing reachable BE addresses
- Ensure firewall allows the BE HTTP port from the SeaTunnel nodes; retry commit
Example fix
// before
Doris {
node-addresses = "fe-host:8030"
}
// after
Doris {
node-addresses = "fe-host:8030,be1:8040,be2:8040"
direct_to_be = true
} Defensive patterns
Strategy: fallback
Validate before calling
// precheck: curl -I the FE stream-load endpoint and confirm BE hosts in Location are reachable from SeaTunnel nodes // nc -z be-host 8040
Try / catch
try {
committer.commit(committable);
} catch (DorisConnectorException e) {
if (e.getErrorCode() == DorisConnectorErrorCode.STREAM_LOAD_FAILED && e.getMessage().contains("307")) {
// fall back to direct-to-BE config or reachable benodes, then retry
}
} Prevention
- Set direct_to_be = true in K8s/NAT environments
- Configure benodes with BE addresses reachable from SeaTunnel nodes
- Fix priority_networks so BE advertises routable IPs
- Open the BE HTTP port (8040) in firewalls
When it happens
Trigger: Stream-load commit POST to FE which responds 307 redirecting to a BE host the client cannot reach; dorisSinkConfig.isDirectToBe() is false; BE behind NAT/load balancer that rewrites the Location host; mixed network zones (container/K8s) where FE-advertised BE addresses aren't routable.
Common situations: Docker/Kubernetes deployments where BE registers with internal hostnames; FE returning unreachable BE nodes in Location; firewalls blocking the BE http port (8040); Doris versions where FE 307 redirect handling changed.
Related errors
- failed to stream load data with label:
- REST_SERVICE_FAILED
- Failed to get response from Doris
- SCHEMA_CHANGE_FAILED
- Failed to get response from Doris FE {}, http code is {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/250e9305726e5f58.
Report an issue: GitHub.