pentaho/pentaho-kettle · warning · KettleJobException
Interrupted during a retry
Error message
Interrupted during a retry
What it means
During login()'s retry loop, the Thread.sleep(delayBetweenEachAttempts) between attempts can throw InterruptedException if the thread is interrupted. The code restores the interrupt flag and rethrows as this KettleJobException so callers know the retry wait was cancelled.
Solutions
- Treat this as an intentional cancellation: stop the SFTP operation rather than retrying.
- Identify what interrupted the thread (job cancel/timeout) and adjust those settings if the interruption is unwanted.
- Avoid long delays between attempts so sleeps are short and cancellation windows small.
- Preserve the interrupt status in any wrapping code (the library already calls Thread.currentThread().interrupt()).
Example fix
// before
catch (KettleJobException e) { /* ignore and continue */ }
// after
catch (KettleJobException e) {
if (Thread.currentThread().isInterrupted()) { log.info("cancelled"); return; }
throw e;
} Defensive patterns
Strategy: try-catch
Try / catch
try {
client.login();
} catch (KettleJobException e) {
if (Thread.currentThread().isInterrupted()) {
log.info("Login retries cancelled by interrupt");
return; // graceful cancellation
}
throw e;
} Prevention
- Design job cancellation paths to expect and honor this error.
- Keep retry delays short to reduce interruption windows.
- Never swallow InterruptedException without restoring the interrupt flag.
When it happens
Trigger: login() sleeping between connection retries when another thread calls interrupt() on the executing job thread (job cancel, shutdown, timeout watchdog).
Common situations: User cancels a stalled job in Spoon; job executor times out and interrupts the worker; application shutdown interrupting background retry loops.
Related errors
- An unexpected error has occurred
- Max connection attempts reached
- Command execution was interrupted
- Could not get the groups of the current user (error code: )
- Could not get user name on remote host (error code: )
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/eb3e4c7e12c9f893.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/sftp/SFTPClient.java:198
int maxConnectionAttempts = 62;
int delayBetweenEachAttempts = 100; // milliseconds
while ( true ) {
try {
if ( tryCreateNewConnection( ) ) {
break;
}
if ( --maxConnectionAttempts <= 0 ) {
throw new KettleJobException( "Max connection attempts reached" );
}
Thread.sleep( delayBetweenEachAttempts );
// incrementing delay by 100 milliseconds
delayBetweenEachAttempts += 100;
} catch ( InterruptedException ex ) {
Thread.currentThread().interrupt();
throw new KettleJobException( "Interrupted during a retry ", ex );
} catch ( Exception e ) {
throw new KettleJobException( "An unexpected error has occurred ", e );
}
}
}
private boolean tryCreateNewConnection( ) {
try {
session.setPassword( this.getPassword() );
java.util.Properties config = new java.util.Properties();
config.put( "StrictHostKeyChecking", "no" );
// set compression property
// zlib, none
String compress = getCompression();
if ( compress != null ) {
config.put( COMPRESSION_S2C, compress );
config.put( COMPRESSION_C2S, compress );
}View on GitHub (pinned to f3058517a1)