{"record":{"id":"b5e376fff23b9d26","repo":"alibaba/DataX","slug":"load-url-cannot-be-empty-or-the-host-cannot-conne","errorCode":null,"errorMessage":"load_url cannot be empty, or the host cannot connect.Please check your configuration.","messagePattern":"load_url cannot be empty, or the host cannot connect\\.Please check your configuration\\.","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisStreamLoadObserver.java","lineNumber":54,"sourceCode":"\n    private long pos;\n    private static final String RESULT_FAILED = \"Fail\";\n    private static final String RESULT_LABEL_EXISTED = \"Label Already Exists\";\n    private static final String LAEBL_STATE_VISIBLE = \"VISIBLE\";\n    private static final String LAEBL_STATE_COMMITTED = \"COMMITTED\";\n    private static final String RESULT_LABEL_PREPARE = \"PREPARE\";\n    private static final String RESULT_LABEL_ABORTED = \"ABORTED\";\n    private static final String RESULT_LABEL_UNKNOWN = \"UNKNOWN\";\n\n\n    public DorisStreamLoadObserver ( Keys options){\n        this.options = options;\n    }\n\n    public void streamLoad(WriterTuple data) throws Exception {\n        String host = getLoadHost();\n        if(host == null){\n            throw new IOException (\"load_url cannot be empty, or the host cannot connect.Please check your configuration.\");\n        }\n        String loadUrl = new StringBuilder(host)\n                .append(\"/api/\")\n                .append(options.getDatabase())\n                .append(\"/\")\n                .append(options.getTable())\n                .append(\"/_stream_load\")\n                .toString();\n        LOG.info(\"Start to join batch data: rows[{}] bytes[{}] label[{}].\", data.getRows().size(), data.getBytes(), data.getLabel());\n        Map<String, Object> loadResult = put(loadUrl, data.getLabel(), addRows(data.getRows(), data.getBytes().intValue()));\n        LOG.info(\"StreamLoad response :{}\",JSON.toJSONString(loadResult));\n        final String keyStatus = \"Status\";\n        if (null == loadResult || !loadResult.containsKey(keyStatus)) {\n            throw new IOException(\"Unable to flush data to Doris: unknown result status.\");\n        }\n        LOG.debug(\"StreamLoad response:{}\",JSON.toJSONString(loadResult));\n        if (RESULT_FAILED.equals(loadResult.get(keyStatus))) {\n            throw new IOException(","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisStreamLoadObserver.java#L36-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n\"loadUrl\": [\"fe1:9030\"]\n// after\n\"loadUrl\": [\"fe1:8030\", \"fe2:8030\"]","handlingStrategy":"validation","validationCode":"// preflight from the DataX host\nfor (String url : loadUrls) {\n  HttpURLConnection c = (HttpURLConnection) new URL(\"http://\" + url + \"/api/bootstrap\").openConnection();\n  c.setConnectTimeout(2000);\n  if (c.getResponseCode() != 200) throw new IllegalStateException(\"loadUrl unreachable: \" + url);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["datax","doris","writer","network","configuration","stream-load"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}