pentaho/pentaho-kettle · critical · KettleException
Error executing transformation and error cleaning up cluster
Error message
Error executing transformation and error cleaning up cluster
What it means
cleanupClusterAfterError wraps a failed cluster cleanup: when the transformation execution already failed (e) and Trans.cleanupCluster also throws, this KettleException is thrown with the cleanup exception chained under the original execution exception. The message signals both the run and the abort/cleanup failed.
Solutions
- Check the chained cause (getCause()) for the original transformation error first
- Verify all slave servers defined for the cluster are reachable via their carte URLs
- Inspect carte logs on each slave to find why the run and/or abort failed
- Retry once slave connectivity is restored
Example fix
// before: ignoring which failure occurred
catch (KettleException e) { log("failed"); }
// after
try {
result = service.executeClustered(log, transMeta, split, config, args);
} catch (KettleException e) {
log("Execution failed: " + e.getCause()); // original trans error; cleanup error is chained
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: verify every cluster slave is reachable before a clustered run
for (SlaveServer slave : transMeta.getClusterSchemas()...) {
if (!slave.getHostname().matches("[a-zA-Z0-9.-]+")) throw new IllegalStateException("Bad slave host");
// optionally: new Socket(slave.getHostname(), slave.getPort()).close();
} Type guard
static boolean slaveReachable(SlaveServer s) {
try (java.net.Socket sock = new java.net.Socket(s.getHostname(), s.getPort())) { return true; }
catch (Exception e) { return false; }
} Try / catch
try {
result = service.executeClustered(log, transMeta, splitter, cfg, args);
} catch (KettleException e) {
Throwable trans = e.getCause() != null ? e.getCause() : e; // original transformation error
logError("Clustered run failed; cleanup also failed. Root: " + trans.getMessage());
// investigate slave logs / network before retrying
} Prevention
- Monitor slave server (carte) health before scheduled clustered runs
- Keep carte logs aggregated for post-mortem
- Use consistent credentials across master and slaves
- Avoid network-reliant cleanup paths on flaky links — verify connectivity up front
When it happens
Trigger: executeClustered catches an execution error, calls cleanupClusterAfterError, and Trans.cleanupCluster itself throws (e.g. slave servers unreachable when trying to abort the clustered run).
Common situations: One or more slave servers in the cluster are down or network-partitioned; carte instances were stopped mid-run; authentication to slave servers fails during abort.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- An error occurred sending a slave transformation:
- An error occurred sending the master transformation:
- An error occurred while preparing the execution of the…
- Could not connect to repository: ...
- Database.Exception.ErrorClosingCallableStatement
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/024a28a170ffc721.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/pan/executors/TransSplitterExecutionService.java:75
} catch ( KettleException e ) {
cleanupClusterAfterError( extLog, transSplitter, e );
}
}
/**
* Cleans up the cluster in case of an error during execution.
*
* @param extLog the log channel interface for logging
* @param transSplitter the TransSplitter instance for splitting the transformation
* @param e the exception that occurred during execution
* @throws KettleException if an error occurs during cleanup
*/
protected void cleanupClusterAfterError( LogChannelInterface extLog, TransSplitter transSplitter, Exception e ) throws KettleException {
// Clean up cluster in case of error
try {
Trans.cleanupCluster( extLog, transSplitter );
} catch ( Exception cleanupException ) {
throw new KettleException( "Error executing transformation and error cleaning up cluster", e );
}
}
}
View on GitHub (pinned to f3058517a1)