pentaho/pentaho-kettle · warning · KettleException
Interrupted exception while running the process
Error message
Interrupted exception while running the process
What it means
The thread running ExecProcess was interrupted while waiting (p.waitFor / stream reads) for the child process; Kettle rethrows it as a KettleException naming the command. Usually means the transformation/step was cancelled or its execution thread killed.
Solutions
- Re-interrupt the current thread in surrounding handling and treat as a cancellation, not a retryable error.
- Investigate why the transformation was stopped (manual stop, timeout, shutdown) before retrying.
- Make the external command finish faster or run it asynchronously outside the transformation.
- Avoid killing/timeout-terminating transformations with long child processes; use safe cancellation points.
Example fix
// before: retrying blindly after cancellation
while (true) { execProcess(...); }
// after: respect interruption
try {
ProcessResult r = execProcess(...);
} catch (KettleException e) {
if (e.getCause() instanceof InterruptedException) {
Thread.currentThread().interrupt();
return; // stop processing
}
throw e;
} Defensive patterns
Strategy: try-catch
Try / catch
try { execProcess(...); } catch (KettleException e) { if (e.getCause() instanceof InterruptedException) { Thread.currentThread().interrupt(); return; } throw e; } Prevention
- Avoid stopping transformations mid child-process execution
- Set realistic timeouts for long-running commands
- Handle interruption as cancellation, never auto-retry
When it happens
Trigger: execProcess: InterruptedException from p.waitFor() or buffered stream reads — step cancelled via Spoon/execution stop, transformation timeout/shutdown, or the parent thread interrupted programmatically.
Common situations: User hits 'Stop' in Spoon while a long-running external process executes; cluster/timeout policies killing worker threads; JVM shutdown hooks; misconfigured timeouts cancelling the transformation.
Related errors
- Command execution was interrupted
- ERROR_0006_ExceptionExecutingTalenJob
- Error while executing \'" + commandLine + "\'. Exit value =…
- Error while executing psql \'
- Error while executing sqlldr ''
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7cc4a8158240ad7d.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/execprocess/ExecProcess.java:232
} else {
// get output stream
processresult.setOutputStream( getOutputString( new BufferedReader( new InputStreamReader( p
.getInputStream() ) ) ) );
// get error message
processresult.setErrorStream( getOutputString( new BufferedReader( new InputStreamReader( p
.getErrorStream() ) ) ) );
// Wait until end
p.waitFor();
// get exit status
processresult.setExistStatus( p.exitValue() );
}
} catch ( IOException ioe ) {
throw new KettleException( "IO exception while running the process " + Arrays.toString( process ) + "!", ioe );
} catch ( InterruptedException ie ) {
throw new KettleException( "Interrupted exception while running the process " + Arrays.toString( process ) + "!", ie );
} catch ( Exception e ) {
throw new KettleException( e );
} finally {
if ( p != null ) {
p.destroy();
}
}
}
private String getOutputString( BufferedReader b ) throws IOException {
StringBuilder retvalBuff = new StringBuilder();
String line;
String delim = meta.getOutputLineDelimiter();
if ( delim == null ) {
delim = "";
} else {
delim = environmentSubstitute( delim );
}View on GitHub (pinned to f3058517a1)