apache/seatunnel · warning · IOException

Closing httpClient failed.

Error message

Closing httpClient failed.

What it means

DorisStreamLoad.close() wraps any IOException thrown while closing the general-purpose Apache HttpClient and rethrows it as 'Closing httpClient failed.'. Same intent as the sibling streamLoadHttpClient error, but for the shared sync client.

Solutions

  1. Check the wrapped cause for the real failure
  2. Ensure abort/commit of 2PC transactions completes before writer close
  3. Treat as benign if it occurs during job teardown with recovered state
  4. Report/upgrade if it reproduces on every checkpoint-triggered close
Defensive patterns

Strategy: try-catch

Try / catch

try { streamLoad.close(); } catch (IOException e) { LOG.warn("close failed", e); /* inspect cause */ }

Prevention

When it happens

Trigger: closeStreamLoadQuietly invokes DorisStreamLoad.close() while httpClient != null and its close() throws an IOException.

Common situations: Connections still leased during failover; abrupt task cancellation; interrupted close during shutdown.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/d83ffba085724c7e. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisStreamLoad.java:375

                        "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)