{"record":{"id":"d5236a5f4b61844d","repo":"pentaho/pentaho-kettle","slug":"unexpected-error-contacting-slave-server","errorCode":null,"errorMessage":"Unexpected error contacting slave server '","messagePattern":"Unexpected error contacting slave server '","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/Trans.java","lineNumber":4223,"sourceCode":"   * 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 ) {\n    return getClusteredTransformationResult( log, transSplitter, parentJob, false );\n  }\n\n  /**","sourceCodeStart":4205,"sourceCodeEnd":4241,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/Trans.java#L4205-L4241","documentation":"Companion to the cleanup error: thrown when the actual HTTP contact with the slave during cleanupTransformation throws any Exception (connection refused, timeout, IO error). The original exception is attached as cause.","triggerScenarios":"During clustered-transformation cleanup, slaveServer.cleanupTransformation() fails to reach the slave: Carte not running, wrong host/port, network outage, SSL/credentials mismatch, or timeout while the slave is busy.","commonSituations":"Slave server shut down before master finished cleaning up; firewall blocks the Carte port; hostname typo or DNS change; Carte authentication enabled but master lacking credentials.","solutions":["Check the cause of the exception and verify the slave Carte service is up (curl its status URL).","Verify the slave's hostname/port/username/password in the cluster schema definition.","Increase timeout or retry cleanup; cleanup is idempotent on the slave side.","Confirm network/firewall allows master-to-slave access on the Carte port.","If slaves are intentionally torn down with the run, suppress or log cleanup errors instead of failing the run."],"exampleFix":"// before: cleanup crashes when slave already stopped\nslaveServer.cleanupTransformation(transName, carteObjectId);\n// after: guard reachability\nif (slaveServer.getSlaveStatus() != null) {\n  slaveServer.cleanupTransformation(transName, carteObjectId);\n}","handlingStrategy":"retry","validationCode":"// probe slave reachability before cleanup\nif (slaveServer.getSlaveStatus() == null) {\n  log.warn(\"Slave \" + slaveServer + \" unreachable; skipping cleanup\");\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  slaveServer.cleanupTransformation(transName, carteObjectId);\n} catch (Exception e) {\n  log.warn(\"Cleanup contact failed, retrying once\", e);\n  slaveServer.cleanupTransformation(transName, carteObjectId); // idempotent\n}","preventionTips":["Keep slaves alive until after master cleanup completes.","Verify Carte host/port and credentials in the cluster schema.","Open firewall paths for the Carte port before runs.","Remember cleanup is idempotent; retry rather than fail the run."],"tags":["kettle","cleanup","slave-server","network","carte"],"backgroundTag":"connection-refused","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"}