{"record":{"id":"645c01c4ea664f65","repo":"pentaho/pentaho-kettle","slug":"error-while-execution-control-command-controlcommand-control","errorCode":null,"errorMessage":"Error while execution control command [controlCommand=${control}]","messagePattern":"Error while execution control command \\[controlCommand=(.+?)\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFast.java","lineNumber":412,"sourceCode":"      builder.define(\n        this.meta.getRequiredFields( this.getTransMeta() ), meta.getTableFieldList(), resolveFileName( this.meta\n          .getDataFile().getValue() ) );\n    } catch ( Exception ex ) {\n      throw new KettleException( \"Error defining data file!\", ex );\n    }\n    builder.show();\n    builder.beginLoading( this.meta.getDbMeta().getPreferredSchemaName(), this.meta.getTargetTable().getValue() );\n\n    builder.insert( this.meta.getRequiredFields( this.getTransMeta() ), meta.getTableFieldList(), this.meta\n      .getTargetTable().getValue() );\n    builder.endLoading();\n    builder.logoff();\n    final String control = builder.toString();\n    try {\n      logDetailed( \"Control file: \" + control );\n      IOUtils.write( control, this.fastload );\n    } catch ( IOException e ) {\n      throw new KettleException( \"Error while execution control command [controlCommand=\" + control + \"]\", e );\n    } finally {\n      IOUtils.closeQuietly( this.fastload );\n    }\n  }\n\n  /**\n   * {@inheritDoc}\n   *\n   * @see org.pentaho.di.trans.step.BaseStep#dispose(org.pentaho.di.trans.step.StepMetaInterface,\n   *      org.pentaho.di.trans.step.StepDataInterface)\n   */\n  @Override\n  public void dispose( final StepMetaInterface smi, final StepDataInterface sdi ) {\n    this.meta = (TeraFastMeta) smi;\n\n    try {\n      if ( this.fastload != null ) {\n        IOUtils.write( new FastloadControlBuilder().endLoading().toString(), this.fastload );","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/terafast-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/terafastbulkloader/TeraFast.java#L394-L430","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nIOUtils.write( control, this.fastload );\n// after\nif ( this.fastload == null ) {\n  throw new KettleException( \"Fastload process is not running\" );\n}\ntry {\n  IOUtils.write( control, this.fastload );\n  this.fastload.flush();\n} catch ( IOException e ) {\n  throw new KettleException( \"Fastload process terminated early; check fastload logs\", e );\n}","handlingStrategy":"try-catch","validationCode":"// ensure fastload is available before running\nProcessBuilder pb = new ProcessBuilder( \"fastload\", \"-v\" );\npb.start().waitFor(); // throws if fastload is missing/broken","typeGuard":null,"tryCatchPattern":"try {\n  teraFastStep.run();\n} catch ( KettleException e ) {\n  if ( e.getMessage().startsWith( \"Error while execution control command\" ) ) {\n    // fastload died before consuming commands: check its stderr log\n    logError( \"fastload terminated early, see fastload session log\", e );\n  } else { throw e; }\n}","preventionTips":["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"],"tags":["teradata","fastload","broken-pipe","process-io","kettle"],"backgroundTag":"broken-pipe","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}