pentaho/pentaho-kettle · error · KettleException
Error while executing psql
Error message
Error while executing psql : {} What it means
IngresVectorwiseLoader.execute() throws this KettleException when Runtime.getRuntime().exec(cmd) throws an IOException while trying to launch the external psql/sql command-line process used to feed data to Ingres VectorWise. The command string is included in the message for diagnosis.
Solutions
- Verify the psql/sql executable path configured in the step is correct and exists
- Ensure the executable is on PATH for the user running the transformation (which psql)
- Check execute permissions on the binary (chmod +x)
- Inspect the wrapped IOException for 'No such file' vs 'Permission denied' and fix accordingly
Example fix
// before sqlPath = "psql"; // not installed // after sqlPath = "/opt/Ingres/ingres/bin/sql"; // absolute path to the client executable
Defensive patterns
Strategy: try-catch
Validate before calling
String path = environmentSubstitute(meta.getSqlPath());
if (new File(path).canExecute() == false) { throw new IllegalStateException("sql client not executable: " + path); } Try / catch
try { loader.execute(result, nr); } catch (KettleException e) { if (e.getCause() instanceof IOException) { logError("Failed to launch sql client: " + e.getCause().getMessage(), e); } } Prevention
- Install the Ingres client on every node running the transformation
- Use absolute paths to the executable instead of PATH lookup
- Verify service-account permissions to execute the client
- Monitor fork limits on busy ETL servers
When it happens
Trigger: processRow() calls execute(), which attempts to start the external SQL process; exec() fails with an IOException — executable not found on PATH, insufficient permission to execute, or system resource limits (fork failed).
Common situations: psql/sql client not installed or not on PATH of the user running Kettle; wrong command path configured in the step; running under a service account lacking execute permission; too many processes (fork limit).
Related errors
- Error opening new file :
- Cannot open control file
- Cannot open data file
- ChangeFileEncoding.Error.CreatingFile
- Could not read file
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/137d02d5880151f9.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ivw-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/ivwloader/IngresVectorwiseLoader.java:137
// throw new Exception("Return code " + result + " received from statement : " + chmodCmd);
// }
}
// 2) Execute the Ingres "sql" command...
//
String cmd = createCommandLine( meta );
String logMessage = masqueradPassword( cmd );
if ( meta.isUseDynamicVNode() ) {
// masquerading the password for log
logMessage = masqueradPassword( cmd );
}
logDetailed( "Executing command: " + logMessage );
try {
data.sqlProcess = rt.exec( cmd );
} catch ( IOException ex ) {
throw new KettleException( "Error while executing psql : " + logMessage, ex );
}
// any error message?
//
data.errorLogger = new StreamLogger( log, data.sqlProcess.getErrorStream(), "ERR_SQL", true );
new Thread( data.errorLogger ).start();
// any output?
data.outputLogger = new StreamLogger( log, data.sqlProcess.getInputStream(), "OUT_SQL" );
// Where do we send the data to? --> To STDIN of the sql process
//
data.sqlOutputStream = data.sqlProcess.getOutputStream();
logWriter = new LogWriter( data.sqlProcess.getInputStream() );
logWriteThread = new Thread( logWriter, "IngresVecorWiseStepLogWriter" );
logWriteThread.start();
View on GitHub (pinned to f3058517a1)