pentaho/pentaho-kettle · error · SshTimeoutException
SSH connection timed out after ms
Error message
SSH connection timed out after ms
What it means
MinaSshConnection.waitForConnection throws SshTimeoutException when the Apache MINA SSHD ConnectFuture never completes within the configured connectTimeout. The connect() call gives up waiting for the TCP/SSH handshake instead of blocking forever. It signals the host was unreachable or too slow, not an authentication problem.
Solutions
- Verify the host is reachable: ping/telnet the host on the SSH port before running the transformation
- Check the configured port matches the SSH server (default 22)
- Increase the connection timeout in the SSH connection config if the network is slow
- Check firewall/security-group rules allow outbound access from the Pentaho host
- Confirm sshd is running on the remote host (systemctl status sshd)
Example fix
// before config.setConnectTimeout(0); // no/infinite timeout, hangs or misbehaves // after config.setConnectTimeout(30000); // 30s explicit timeout
Defensive patterns
Strategy: retry
Validate before calling
// before connect()
InetAddress addr = InetAddress.getByName( host );
try ( Socket s = new Socket() ) {
s.connect( new InetSocketAddress( addr, port ), 5000 ); // TCP probe; if this fails, SSH connect will time out too
} Try / catch
try { conn.connect(); }
catch ( SshTimeoutException e ) {
log.warn( "SSH connect timed out: {}", e.getMessage() );
// bounded retry with backoff
}
Prevention
- Always set a positive connectTimeout instead of 0/unlimited
- Probe host:port reachability before running the job
- Document required firewall openings for the Pentaho host
- Monitor network latency between Pentaho and SSH targets
When it happens
Trigger: connect() is called with connectTimeout > 0 and the future does not report connected state before the deadline elapses — e.g. host down, wrong port, firewall dropping packets, or slow network.
Common situations: Typo in hostname/port in Spoon job config; SSH service not running on the remote host; corporate firewall silently dropping outbound port 22; EC2 security group not allowing the client IP.
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.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- SSH connection failed while waiting with no configured…
- Command execution timed out after
- Failed to download file:
- Failed to open SFTP session
- SFTPPUT.Error.Connection
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c9b009ac031a9f2a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/ssh/mina/MinaSshConnection.java:262
// immediately without waiting for connection completion. Use no-argument await() for
// non-positive timeouts; it waits
// until the connection is established with no deadline imposed.
long connectTimeout = config.getConnectTimeoutMillis();
boolean connected;
try {
if ( connectTimeout > 0 ) {
connected = cf.await( connectTimeout );
} else {
connected = cf.await();
}
} catch ( IOException e ) {
throw new SshConnectionException( "SSH connection failed during await", e );
}
if ( !connected ) {
if ( connectTimeout > 0 ) {
throw new SshTimeoutException( "SSH connection timed out after " + connectTimeout + "ms" );
}
throw new SshTimeoutException( "SSH connection failed while waiting with no configured timeout" );
}
if ( !cf.isConnected() ) {
Throwable cause = cf.getException();
throw new SshConnectionException( "SSH connection failed", cause );
}
}
private ClientSession establishSession( ConnectFuture cf ) throws SshConnectionException {
ClientSession s = cf.getSession();
if ( s == null ) {
throw new SshConnectionException( "SSH connection failed - session is null" );
}
return s;View on GitHub (pinned to f3058517a1)