alibaba/DataX · critical · IOException
load_url cannot be empty, or the host cannot connect.Please
Error message
load_url cannot be empty, or the host cannot connect.Please check your configuration.
What it means
DorisStreamLoadObserver.streamLoad throws this IOException when getLoadHost() returns null — i.e. no usable FE HTTP host could be obtained from the configured loadUrl list. The writer picks a reachable host from options.getLoadUrl() (with optional connection testing); an empty list or all-unreachable hosts yields null and this aborts the flush before any HTTP request is made.
Source
Thrown at doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisStreamLoadObserver.java:54
private long pos;
private static final String RESULT_FAILED = "Fail";
private static final String RESULT_LABEL_EXISTED = "Label Already Exists";
private static final String LAEBL_STATE_VISIBLE = "VISIBLE";
private static final String LAEBL_STATE_COMMITTED = "COMMITTED";
private static final String RESULT_LABEL_PREPARE = "PREPARE";
private static final String RESULT_LABEL_ABORTED = "ABORTED";
private static final String RESULT_LABEL_UNKNOWN = "UNKNOWN";
public DorisStreamLoadObserver ( Keys options){
this.options = options;
}
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(View on GitHub (pinned to 80ec23d5c5)
Solutions
- Set loadUrl to the Doris FE HTTP endpoints, e.g. "loadUrl": ["fe_host1:8030", "fe_host2:8030"].
- From the DataX host, curl http://<fe>:8030/api/bootstrap to confirm reachability.
- Open the FE http_port (default 8030) in firewall/security groups.
- List multiple FEs so a single unreachable FE does not null out host selection.
Example fix
// before "loadUrl": ["fe1:9030"] // after "loadUrl": ["fe1:8030", "fe2:8030"]
Defensive patterns
Strategy: validation
Validate before calling
// preflight from the DataX host
for (String url : loadUrls) {
HttpURLConnection c = (HttpURLConnection) new URL("http://" + url + "/api/bootstrap").openConnection();
c.setConnectTimeout(2000);
if (c.getResponseCode() != 200) throw new IllegalStateException("loadUrl unreachable: " + url);
} Prevention
- Always configure at least two FE http_port (8030) endpoints in loadUrl.
- Add a network preflight (curl the FE HTTP port) to deployment checklists for Doris jobs.
When it happens
Trigger: loadUrl in the job JSON is missing, empty, or lists only hosts that are unreachable from the DataX machine (wrong port — stream load uses the FE http_port, typically 8030, not the MySQL port 9030; firewall; FE down). It also fires when every candidate host fails the reachability check.
Common situations: Configuring loadUrl with the query port instead of the webserver port, DNS resolving inside the cluster but not from the DataX host, security groups blocking 8030, or all FEs being restarted simultaneously during the job.
Related errors
- Failed to create row serializer, unsupported `format` from s
- Failed to parse delimiter: `Hex str is empty`
- Failed to parse delimiter: `Hex str length error`
- Failed to parse delimiter: `Hex str format error`
- Unable to flush data to Doris: unknown result status.
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/b5e376fff23b9d26.
Report an issue: GitHub.