apache/seatunnel · error
source close failed
Error message
source close failed
What it means
SourceFlowLifeCycle.signalNoMoreElement sends a SourceNoMoreElementOperation to the member hosting the split enumerator, signalling the source reader has finished. If the remote call fails, this message is logged at WARN and the exception is wrapped in a RuntimeException, which fails the source task. The enumerator may never learn the reader finished, stalling split completion for that source.
Solutions
- Check whether the enumerator task/node is still alive in engine logs; if the node died, the job will be restarted by fault tolerance — verify job state.
- Inspect connectivity between cluster members (ports, firewall) if this recurs on healthy nodes.
- Retry/re-run the job; checkpoint restore should resume from the last completed checkpoint.
- If caused by a task-cancel race, prefer graceful stop and upgrade if a fixed teardown race exists in a newer SeaTunnel version.
Example fix
// before: node crashed, remote call hangs then fails sendToMember(new SourceNoMoreElementOperation(...), deadMemberAddress).get(); // after: restore/reattach after node recovery, job resumes from checkpoint seaTunnel.sh -r <jobId> // resubmit with restore from last checkpoint
Defensive patterns
Strategy: retry
Try / catch
try {
sourceJob.execute();
} catch (RuntimeException e) {
if (e.getCause() != null && e.getCause().getMessage() != null
&& e.getCause().getMessage().contains("source close failed")) {
retryJobWithCheckpointRestore();
} else {
throw e;
}
} Prevention
- Run the source and its enumerator on stable, connected nodes; avoid mixing with spot/preemptible workers.
- Enable checkpointing so a failed finish signal is recoverable by restore.
- Monitor inter-node connectivity; network partitions cause this.
- Prefer graceful stop over node kill during source finish.
When it happens
Trigger: The blocking .sendToMember(...).get() to enumeratorTaskAddress throws — e.g. the enumerator task's member died, network partition, or the future timed out — during source close/finish handling.
Common situations: Worker node crash or restart while a source reader finishes; network instability between Zeta nodes; source job teardown racing with enumerator task completion.
Related errors
- Reader is not registered. Pending splits are not assigned.
- UNSUPPORTED_OPERATION
- Airtable API rate limit reached, retry
- At least one source plugin must be configured.
- BigtableSourceSplitEnumerator already closed; cannot create…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/acd4c599d86d1861.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SourceFlowLifeCycle.java:340
* <p>Sets the {@code prepareClose} flag to {@code true} and sends a {@link
* SourceNoMoreElementOperation} to the remote enumerator, deregistering this reader from
* further split assignment.
*
* @throws RuntimeException if the deregistration message fails to send
*/
public void signalNoMoreElement() {
// ready close this reader
try {
this.prepareClose = true;
runningTask
.getExecutionContext()
.sendToMember(
new SourceNoMoreElementOperation(
currentTaskLocation, enumeratorTaskLocation),
enumeratorTaskAddress)
.get();
} catch (Exception e) {
log.warn("source close failed", e);
throw new RuntimeException(e);
}
}
/**
* Registers this reader with the remote split enumerator.
*
* <p>Sends a {@link SourceRegisterOperation} to the enumerator at the previously resolved
* address, informing it that this reader subtask is ready to receive splits.
*
* @throws RuntimeException if registration fails due to communication errors
*/
private void register() {
try {
runningTask
.getExecutionContext()
.sendToMember(
new SourceRegisterOperation(View on GitHub (pinned to cf67b549a7)