apache/seatunnel · error · IOException
Exceeded maxBatchSendAttempts=${maxBatchSendAttempts} withou
Error message
Exceeded maxBatchSendAttempts=${maxBatchSendAttempts} without RECEIVED for batch ${batchId} What it means
sendBatchUntilReceived retries a batch only up to config.getMaxBatchSendAttempts() times (driven by RETRY replies, which increment the counter). If the attempt budget is exhausted without ever receiving RECEIVED, the loop exits and this IOException is thrown, meaning the batch was not acknowledged by the collector.
Source
Thrown at seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/socket/EdgeSocketLineTransport.java:84
}
if (EdgeSocketProtocol.RESP_DECRYPT_FAILED.equals(reply)) {
throw new IOException(
"Edge socket ingress decryption failed (DECRYPT_FAILED): verify "
+ "output.aes-secret-key-base64 matches EdgeSocket source "
+ "secret_key");
}
throw new IOException(
"Unexpected batch response: "
+ reply
+ " (expected "
+ EdgeSocketProtocol.RESP_RECEIVED
+ ", "
+ EdgeSocketProtocol.RESP_RETRY
+ ", or "
+ EdgeSocketProtocol.RESP_QUEUE_FULL_PREFIX
+ "<ms>)");
}
throw new IOException(
"Exceeded maxBatchSendAttempts="
+ config.getMaxBatchSendAttempts()
+ " without RECEIVED for batch "
+ batchId);
}
private static void handleAuthResponse(String reply) throws IOException {
if (EdgeSocketProtocol.RESP_REJECTED.equals(reply)) {
throw new EdgeSocketCollectorRejectedException();
}
if (EdgeSocketProtocol.RESP_AUTH_FAILED.equals(reply)) {
throw new EdgeSocketCollectorRejectedException(
"Edge socket authentication rejected (AUTH_FAILED): check output token matches"
+ " EdgeSocket source secret_key");
}
if (!EdgeSocketProtocol.RESP_ACK.equals(reply)) {
throw new IOException(
"Unexpected auth response: "View on GitHub (pinned to cf67b549a7)
Solutions
- Increase maxBatchSendAttempts (and/or initialBackoffMs/maxBackoffMs) in EdgeTransportConfig to tolerate longer collector overload
- Check collector-side logs/metrics for overload or downstream sink slowness and relieve the bottleneck
- Persist/requeue the failed batch (WAL) and resend with the same batchId after the collector recovers
- Verify network latency between agent and collector is within expected bounds
Example fix
// before config.setMaxBatchSendAttempts(3); // after config.setMaxBatchSendAttempts(20); config.setMaxBackoffMs(30_000);
Defensive patterns
Strategy: retry
Validate before calling
// pre-check config
if (config.getMaxBatchSendAttempts() < 5) log.warn("maxBatchSendAttempts too low for unstable links"); Try / catch
try { client.send(batchId, payload); } catch (IOException e) { if (e.getMessage().contains("Exceeded maxBatchSendAttempts")) { wal.requeue(batchId, payload); } } Prevention
- Size maxBatchSendAttempts for worst-case collector load
- Monitor collector queue depth and tune QUEUE_FULL backoffs
- Keep the WAL so unacknowledged batches can be replayed
- Alert on collector backlog before clients exhaust attempts
When it happens
Trigger: Collector keeps answering RETRY (or QUEUE_FULL) for maxBatchSendAttempts consecutive attempts — persistent collector overload, backpressure, or slow ingestion — while never confirming the batch.
Common situations: Collector under heavy load with a small maxBatchSendAttempts; maxBatchSendAttempts set to a very low value in config; network latency causing long round trips combined with tight backoff caps; collector stuck processing a downstream sink.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Execute given execution failed after retry <n> times
- sendUntilReceived exhausted reconnect cycles for batchId=${b
- Timed out waiting for error sink queue to drain. jobId=%d, p
- Edge socket receiver loop exception, retrying
- Ambiguous timeout on Couchbase write (docId='{}'), attempt={
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/176438960602411d.
Report an issue: GitHub.