{"record":{"id":"dda5c1a98ae71611","repo":"pentaho/pentaho-kettle","slug":"unable-to-run-clean-up-on-slave-server","errorCode":null,"errorMessage":"Unable to run clean-up on slave server '","messagePattern":"Unable to run clean-up on slave server '","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/Trans.java","lineNumber":4219,"sourceCode":"    return errors;\n  }\n\n  /**\n   * Cleanup the slave server as part of a clustered transformation.\n   *\n   * @param transSplitter  the TransSplitter object\n   * @param slaveServer    the slave server\n   * @param slaveTransMeta the slave transformation meta-data\n   * @throws KettleException if any errors occur during cleanup\n   */\n  public static void cleanupSlaveServer( TransSplitter transSplitter, SlaveServer slaveServer,\n                                         TransMeta slaveTransMeta ) throws KettleException {\n    String transName = slaveTransMeta.getName();\n    try {\n      String carteObjectId = transSplitter.getCarteObjectMap().get( slaveTransMeta );\n      WebResult webResult = slaveServer.cleanupTransformation( transName, carteObjectId );\n      if ( !WebResult.STRING_OK.equals( webResult.getResult() ) ) {\n        throw new KettleException( \"Unable to run clean-up on slave server '\" + slaveServer + \"' for transformation '\"\n          + transName + \"' : \" + webResult.getMessage() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unexpected error contacting slave server '\" + slaveServer\n        + \"' to clear up transformation '\" + transName + \"'\", e );\n    }\n  }\n\n  /**\n   * Gets the clustered transformation result.\n   *\n   * @param log           the log channel interface\n   * @param transSplitter the TransSplitter object\n   * @param parentJob     the parent job\n   * @return the clustered transformation result\n   */\n  public static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,\n                                                               Job parentJob ) {","sourceCodeStart":4201,"sourceCodeEnd":4237,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/Trans.java#L4201-L4237","documentation":"Thrown by Trans's slave cleanup helper (executed during clustered run cleanup): the call to SlaveServer.cleanupTransformation(name, carteObjectId) succeeded over HTTP but returned a WebResult that is not 'OK', meaning the slave refused or failed the cleanup for that transformation.","triggerScenarios":"During cleanup of a clustered transformation, a slave's cleanup servlet responds non-OK: the transformation name/id is not registered on the slave, or the slave's internal cleanup (removing logging entries, temp files,_kettle internal files) failed.","commonSituations":"Carte restarted on the slave so the transformation id no longer exists; cleanup invoked twice; permissions problems on the slave removing temp/transaction files; name mismatch because TransMeta was renamed after registration.","solutions":["Read the appended webResult.getMessage() to see the slave's cleanup error and the slave's carte.log.","Verify the transformation was actually prepared/started on that slave (matching name and carte object id).","If the slave was restarted, the transformation is already gone; treat the cleanup miss as benign or restart Carte cleanly.","Check the slave has write permissions to its temp/internal directories.","Re-run the full clustered execution to get consistent ids across master and slaves."],"exampleFix":"// before: blindly cleaning up a possibly-dead slave\nslaveServer.cleanupTransformation(transName, carteObjectId);\n// after: verify registration first\nSlaveServerTransStatus st = slaveServer.getTransStatus(transName, carteObjectId, 0);\nif (st != null) slaveServer.cleanupTransformation(transName, carteObjectId);","handlingStrategy":"try-catch","validationCode":"// only clean up a transformation that still exists on the slave\nSlaveServerTransStatus st = slaveServer.getTransStatus(transName, carteObjectId, 0);\nboolean exists = st != null;","typeGuard":null,"tryCatchPattern":"try {\n  trans.cleanup(); // conceptual guard around clustered cleanup path\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"Unable to run clean-up on slave server\")) {\n    log.warn(\"Slave cleanup failed (id may be gone): \" + e.getMessage());\n    // treat as non-fatal: transformation likely already removed\n  } else throw e;\n}","preventionTips":["Check transformation registration on the slave before cleanup.","Treat cleanup misses after a slave restart as benign.","Ensure the slave's temp directories are writable.","Re-run full executions to keep ids consistent across nodes."],"tags":["kettle","cleanup","slave-server","carte"],"backgroundTag":"api-error-response","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"}