apache/seatunnel · warning · IOException
Closing streamLoadHttpClient failed.
Error message
Closing streamLoadHttpClient failed.
What it means
DorisStreamLoad.close() wraps any IOException thrown while closing the dedicated stream-load HTTP client (CloseableHttpAsyncClient) and rethrows it with this message. It indicates resources of the stream load client could not be released cleanly.
Source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisStreamLoad.java:368
String loadResult = EntityUtils.toString(response.getEntity());
Map<String, String> res =
JsonUtils.parseObject(loadResult, new TypeReference<HashMap<String, String>>() {});
if (!LoadStatus.SUCCESS.equals(res.get("status"))) {
if (ResponseUtil.isCommitted(res.get("msg"))) {
throw new DorisConnectorException(
DorisConnectorErrorCode.STREAM_LOAD_FAILED,
"try abort committed transaction, " + "do you recover from old savepoint?");
}
log.warn("Fail to abort transaction. txnId: {}, error: {}", txnID, res.get("msg"));
}
}
public void close() throws IOException {
if (null != streamLoadHttpClient) {
try {
streamLoadHttpClient.close();
} catch (IOException e) {
throw new IOException("Closing streamLoadHttpClient failed.", e);
}
}
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
throw new IOException("Closing httpClient failed.", e);
}
}
if (null != executorService) {
executorService.shutdownNow();
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the cause for the underlying close failure
- Ensure in-flight stream loads are finished/aborted before closing the writer
- Ignore if it occurs during abrupt task cancellation after the job state is recovered
- Upgrade connector version where close is more defensive
Example fix
// before
// close() propagates IOException
// after
try {
streamLoad.close();
} catch (IOException e) {
LOG.warn("DorisStreamLoad close failed", e);
} Defensive patterns
Strategy: try-catch
Try / catch
try { streamLoad.close(); } catch (IOException e) { LOG.warn("DorisStreamLoad close failed", e); } Prevention
- Complete or abort stream loads before closing
- Avoid closing during active request execution
- Log-and-continue during failover teardown
When it happens
Trigger: closeStreamLoadQuietly invokes DorisStreamLoad.close() while streamLoadHttpClient != null and its close() throws an IOException.
Common situations: Client still executing in-flight requests during task cancellation; interrupted I/O during job failover; underlying connection pool shutdown errors.
Related errors
- Closing httpClient failed.
- failed to close arrow stream reader.
- Error while closing Databend source reader
- Failed to close Neo4j source reader.
- Failed to close Pulsar client after aborting transactions.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/47a8b98df58d73c7.
Report an issue: GitHub.