apache/seatunnel · error · SocketConnectorException
SEND_MESSAGE_TO_SOCKET_SERVER_FAILED
SEND_MESSAGE_TO_SOCKET_SERVER_FAILED
Error message
Failed to send message '%s' to socket server at %s:%d. Connection re-tries are not enabled.
What it means
Thrown by SocketClient.write when writing/flushing a serialized row to the socket server fails with an IOException and retries are not enabled, so the failed message and endpoint are reported and the write aborts.
Solutions
- Enable and configure socket sink retries so transient failures reconnect
- Verify the socket server is running and reachable at the configured host/port
- Check for network/firewall issues between the SeaTunnel task and the server
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at seatunnel-connectors-v2/connector-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/socket/sink/SocketClient.java:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/17463990b1f1d7e2.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/socket/sink/SocketClient.java:82
createConnection();
}
} catch (IOException e) {
throw new SocketConnectorException(
SocketConnectorErrorCode.SOCKET_SERVER_CONNECT_FAILED,
String.format("Cannot connect to socket server at %s:%d", hostName, port),
e);
}
}
public void write(SeaTunnelRow row) throws IOException {
byte[] msg = serializationSchema.serialize(row);
try {
outputStream.write(msg);
outputStream.flush();
} catch (IOException e) {
// if no re-tries are enable, fail immediately
if (maxNumRetries == 0) {
throw new SocketConnectorException(
SocketConnectorErrorCode.SEND_MESSAGE_TO_SOCKET_SERVER_FAILED,
String.format(
"Failed to send message '%s' to socket server at %s:%d. Connection re-tries are not enabled.",
row, hostName, port),
e);
}
log.error(
"Failed to send message '{}' to socket server at {}:{}. Trying to reconnect...",
row,
hostName,
port,
e);
synchronized (SocketClient.class) {
IOException lastException = null;
retries = 0;
while (isRunning && (maxNumRetries < 0 || retries < maxNumRetries)) {View on GitHub (pinned to cf67b549a7)