apache/seatunnel · warning
Edge socket receiver loop exception, retrying
Error message
Edge socket receiver loop exception, retrying
What it means
EdgeSocketIngressServer.shouldExitOnException logs this warning when the receiver loop hit an exception that is NOT terminal: if the exception is an EdgeSocketConnectorException with SOURCE_REOPEN_EXHAUSTED it is rethrown; otherwise the loop logs 'retrying' and returns whether it was interrupted during the retry wait. The source keeps trying to receive data instead of failing the task.
Source
Thrown at seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/source/EdgeSocketIngressServer.java:183
if (shouldExitOnException(e)) {
return;
}
}
}
}
private boolean shouldExitOnException(Exception e) {
if (!isReceiverActive()) {
return true;
}
if (e instanceof EdgeSocketConnectorException) {
EdgeSocketConnectorException ece = (EdgeSocketConnectorException) e;
if (ece.getSeaTunnelErrorCode()
== EdgeSocketConnectorErrorCode.SOURCE_REOPEN_EXHAUSTED) {
throw ece;
}
}
log.warn("Edge socket receiver loop exception, retrying", e);
return isInterruptedDuringRetryWait();
}
private void serveOneCollector() throws IOException {
ServerSocket ss = serverSocket;
if (ss == null || ss.isClosed()) {
return;
}
Socket raw = ss.accept();
raw.setSoTimeout(config.getAcceptTimeoutMs());
try (IngressChannel channel = new BlockingIngressChannel(raw)) {
log.info("Accepted edge collector connection from {}", channel.remoteAddress());
if (hasActiveCollector) {
log.warn(
"Rejected edge collector from {}: another collector is already connected",
channel.remoteAddress());
channel.writeLine(EdgeSocketResponseCode.REJECTED.getCode());View on GitHub (pinned to cf67b549a7)
Solutions
- Check the chained cause in the log for the underlying IO/protocol error
- Verify the edge device/sender is connected and sending well-formed frames
- Tune the connector's retry/reopen limits so transient blips don't exhaust reopen attempts
- Inspect network stability (timeouts, MTU, firewall) between sender and receiver
Example fix
null
Defensive patterns
Strategy: retry
Validate before calling
// Before starting the source, verify the ingress port is bindable and reachable
try (ServerSocket s = new ServerSocket(port)) { /* port free */ } Try / catch
try { server.receiveLoop(); } catch (EdgeSocketConnectorException e) { if (e.getSeaTunnelErrorCode() == EdgeSocketConnectorErrorCode.SOURCE_REOPEN_EXHAUSTED) { /* fail job / restart from checkpoint */ } else { retryWithBackoff(); } } Prevention
- Configure generous retry/reopen limits with exponential back-off
- Monitor edge-device connectivity and sender frame validity
- Alert on repeated 'receiver loop exception' warnings before reopen exhaustion
When it happens
Trigger: receiveLoop caught an arbitrary exception (IO error, socket reset, decoder failure) that is not the reopen-exhausted marker; logged right before a retry back-off wait.
Common situations: Edge device dropping the TCP connection mid-send; network blips between the collector and the ingress server; malformed frames from a misbehaving sender; server socket temporarily unavailable during redeploy.
Related errors
- SOURCE_REOPEN_EXHAUSTED
- SNMP request timed out for agent {host}:{port}
- QUEST_QUERY_PLAN_FAILED
- Exceeded maxBatchSendAttempts=${maxBatchSendAttempts} withou
- EOF from edge socket ingress
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/04ef24e3a73fe81f.
Report an issue: GitHub.