pentaho/pentaho-kettle · error · KettleException
Interrupted while trying to connect to server socket
Error message
Interrupted while trying to connect to server socket: {e} What it means
Thrown by RemoteStep.openReaderSocket when the loop that repeatedly attempts to connect to the remote server socket is interrupted (the worker thread receives InterruptedException). The connection attempt is aborted and the interrupt condition is reported as a KettleException.
Solutions
- If the stop was intentional, treat this as expected cancellation; check the transformation log for 'Stopped' entries.
- If unintentional, check for code calling trans.stopAll() or Thread.interrupt() during startup.
- Verify the remote slave server is reachable and the SocketWriter starts quickly enough that no long retry loop is needed.
- Increase TIMEOUT_IN_SECONDS-related budgets or reduce cluster startup latency so the socket opens before interruption.
Defensive patterns
Strategy: try-catch
Validate before calling
// Detect a stop request before opening the remote reader
if (trans.isStopped()) { return; // skip openReaderSocket, transformation is being cancelled } Try / catch
try { remoteStep.openReaderSocket(baseStep); } catch (KettleException e) { if (e.getMessage().startsWith("Interrupted while trying to connect")) { log.warn("Connection wait was interrupted by a stop request"); } else { throw e; } } Prevention
- Check trans.isStopped() before and during clustered startup
- Avoid interrupting transformation threads programmatically
- Ensure slave servers start promptly so the retry loop exits quickly
When it happens
Trigger: The transformation is stopped/cancelled while openReaderSocket is still retrying to connect to the remote slave's server socket, so the sleeping/connecting thread is interrupted.
Common situations: Users hitting Stop in Spoon while a clustered transformation is waiting for the remote step's socket writer to come up; trans.stopAll() interrupting socket wait threads.
Related errors
- Unable to connect to the SocketWriter in the
- Unable to connect to the SocketWriter in the " +…
- Error opening reader socket to remote step '" + remoteStep…
- Error opening writer socket to remote step '" + remoteStep…
- GetSequence.Exception.CouldNotFindNextValueForSequence
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/9d3efc9667578628.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/step/RemoteStep.java:629
lastException = null;
} catch ( Exception e ) {
lastException =
new KettleException( "Unable to open socket to server " + realHostname + " port " + portNumber, e );
}
if ( lastException != null ) {
// Sleep for a while
try {
Thread.sleep( 250 );
} catch ( InterruptedException e ) {
if ( socket != null ) {
socket.shutdownInput();
socket.shutdownOutput();
socket.close();
baseStep.logDetailed( "Closed connection to server socket to read rows from remote step on server "
+ realHostname + " port " + portNumber + " - Local port=" + socket.getLocalPort() );
}
throw new KettleException( "Interrupted while trying to connect to server socket: " + e.toString() );
}
}
}
// See if all was OK...
if ( lastException != null ) {
baseStep.logError( "Error initialising step: " + lastException.toString() );
if ( socket != null ) {
socket.shutdownInput();
socket.shutdownOutput();
socket.close();
baseStep.logDetailed( "Closed connection to server socket to read rows from remote step on server "
+ realHostname + " port " + portNumber + " - Local port=" + socket.getLocalPort() );
}
throw lastException;
} else {
if ( inputStream == null ) {View on GitHub (pinned to f3058517a1)