pentaho/pentaho-kettle · error · KettleException
IO exception while running the process
Error message
IO exception while running the process
What it means
ExecProcess wraps any IOException from launching or waiting on the child process (ProcessBuilder start, waitFor/streams) into a KettleException naming the full command array. Commonly the executable does not exist or is not executable.
Solutions
- Check the cause (IOException message: 'No such file or directory' vs 'Permission denied') and fix the command path.
- Use an absolute path to the executable or ensure it is on PATH for the Pentaho user.
- For shell built-ins/Windows commands, wrap in ['cmd','/c',cmd] or ['/bin/sh','-c',cmd].
- chmod +x the script and verify the Pentaho process user can execute it.
Example fix
// before: relies on PATH, fails with IOException
String[] process = new String[] { "myscript.sh" };
// after
String[] process = new String[] { "/opt/scripts/myscript.sh" }; // chmod +x applied
// or for shell commands:
String[] process = new String[] { "/bin/sh", "-c", processString }; Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check the executable
java.io.File exe = new java.io.File(command[0]);
if (!exe.canExecute()) { throw new IllegalStateException("Not executable: " + command[0]); } Try / catch
try { execProcess(process, args, execResult); } catch (KettleException e) { if (e.getCause() instanceof IOException) { log.error("Cannot launch process " + Arrays.toString(process), e.getCause()); } } Prevention
- Use absolute paths for executables
- chmod +x scripts and check the runtime user's permissions
- Wrap shell built-ins in /bin/sh -c or cmd /c
When it happens
Trigger: execProcess: Runtime.exec/ProcessBuilder.start throws IOException — command not found, permission denied on the executable, working directory invalid, or stream redirect failures.
Common situations: Command string contains the binary name only and it is not on PATH; spaces/paths on Windows (cmd /c needed); row-supplied command with bad characters; no execute permission on the script; environment variables missing.
Related errors
- Error while executing psql \'
- GPG.IOException
- unable to create directory:
- Unable to save messages properties file '
- AbsSecurityManager.ERROR_0005_INSUFFICIENT_PRIVELEGES
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/806bd9bfa579fa40.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/execprocess/ExecProcess.java:230
if ( p == null ) {
processresult.setErrorStream( errorMsg );
} 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 {View on GitHub (pinned to f3058517a1)