pentaho/pentaho-kettle · error · KettleException
Error while execution control command
Error message
Error while execution control command [controlCommand=${control}] What it means
The step failed while writing the assembled fastload control commands to the running fastload process's stdin (this.fastload process stream). An IOException from IOUtils.write means the fastload process is gone or its pipes are broken, so the control commands could not be delivered.
Solutions
- Check the fastload process's stderr/log output for why it exited before consuming the control commands
- Verify the fastload utility is installed, on PATH, and the version is compatible
- Validate the generated control file content (it is logged at detailed level) for syntax errors that would crash fastload
- Ensure sufficient disk space and permissions in the working/data file directories
Example fix
// before
IOUtils.write( control, this.fastload );
// after
if ( this.fastload == null ) {
throw new KettleException( "Fastload process is not running" );
}
try {
IOUtils.write( control, this.fastload );
this.fastload.flush();
} catch ( IOException e ) {
throw new KettleException( "Fastload process terminated early; check fastload logs", e );
} Defensive patterns
Strategy: try-catch
Validate before calling
// ensure fastload is available before running ProcessBuilder pb = new ProcessBuilder( "fastload", "-v" ); pb.start().waitFor(); // throws if fastload is missing/broken
Try / catch
try {
teraFastStep.run();
} catch ( KettleException e ) {
if ( e.getMessage().startsWith( "Error while execution control command" ) ) {
// fastload died before consuming commands: check its stderr log
logError( "fastload terminated early, see fastload session log", e );
} else { throw e; }
} Prevention
- Monitor the fastload process's stderr/stdout logs for early termination
- Verify fastload installation and version compatibility on all execution nodes
- Ensure adequate disk space in data-file and working directories
- Enable detailed logging to capture the control commands sent to fastload
When it happens
Trigger: invokeLoadingCommand() executes IOUtils.write(control, this.fastload) after builder.logoff(); the fastload process has exited or the pipe is closed, so the write throws IOException.
Common situations: fastload binary crashed earlier due to a bad control script; fastload not installed or wrong version; process killed by OS (disk full, permissions); previous fastload errors already terminated the session.
Related errors
- Cannot pipe content of control file to fastload
- Cannot open control file
- Cannot open data file
- Error defining data file!
- Error while setup
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/645c01c4ea664f65.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFast.java:412
builder.define(
this.meta.getRequiredFields( this.getTransMeta() ), meta.getTableFieldList(), resolveFileName( this.meta
.getDataFile().getValue() ) );
} catch ( Exception ex ) {
throw new KettleException( "Error defining data file!", ex );
}
builder.show();
builder.beginLoading( this.meta.getDbMeta().getPreferredSchemaName(), this.meta.getTargetTable().getValue() );
builder.insert( this.meta.getRequiredFields( this.getTransMeta() ), meta.getTableFieldList(), this.meta
.getTargetTable().getValue() );
builder.endLoading();
builder.logoff();
final String control = builder.toString();
try {
logDetailed( "Control file: " + control );
IOUtils.write( control, this.fastload );
} catch ( IOException e ) {
throw new KettleException( "Error while execution control command [controlCommand=" + control + "]", e );
} finally {
IOUtils.closeQuietly( this.fastload );
}
}
/**
* {@inheritDoc}
*
* @see org.pentaho.di.trans.step.BaseStep#dispose(org.pentaho.di.trans.step.StepMetaInterface,
* org.pentaho.di.trans.step.StepDataInterface)
*/
@Override
public void dispose( final StepMetaInterface smi, final StepDataInterface sdi ) {
this.meta = (TeraFastMeta) smi;
try {
if ( this.fastload != null ) {
IOUtils.write( new FastloadControlBuilder().endLoading().toString(), this.fastload );View on GitHub (pinned to f3058517a1)