{"record":{"id":"c085bd240d89d2da","repo":"pentaho/pentaho-kettle","slug":"no-master-server-could-be-found-in-the-original","errorCode":null,"errorMessage":"No master server could be found in the original transformation","messagePattern":"No master server could be found in the original transformation","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/cluster/TransSplitter.java","lineNumber":446,"sourceCode":"  public TransMeta[] getSlaves() {\n    Collection<TransMeta> collection = slaveTransMap.values();\n    return collection.toArray( new TransMeta[collection.size()] );\n  }\n\n  public SlaveServer[] getSlaveTargets() {\n    Set<SlaveServer> set = slaveTransMap.keySet();\n    return set.toArray( new SlaveServer[set.size()] );\n  }\n\n  public SlaveServer getMasterServer() throws KettleException {\n    StepMeta[] steps = originalTransformation.getStepsArray();\n    for ( int i = 0; i < steps.length; i++ ) {\n      ClusterSchema clusterSchema = steps[i].getClusterSchema();\n      if ( clusterSchema != null ) {\n        return clusterSchema.findMaster();\n      }\n    }\n    throw new KettleException( \"No master server could be found in the original transformation\" );\n  }\n\n  public void splitOriginalTransformation() throws KettleException {\n    clear();\n    // Mixing clusters is not supported at the moment\n    // Perform some basic checks on the cluster configuration.\n    //\n    findUsedOriginalSteps();\n    checkClusterConfiguration();\n    generateSlavePartitionSchemas();\n\n    try {\n      SlaveServer masterSlaveServer = getMasterServer();\n      masterTransMeta = getOriginalCopy( false, null, null );\n      ClusterSchema clusterSchema = originalTransformation.findFirstUsedClusterSchema();\n      List<SlaveServer> slaveServers = clusterSchema.getSlaveServers();\n      int nrSlavesNodes = clusterSchema.findNrSlaves();\n","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/cluster/TransSplitter.java#L428-L464","documentation":"TransSplitter.getMasterServer scans the transformation's steps for a cluster schema and returns that schema's master slave server. If no step has a cluster schema, or the schema has no server marked as master, it throws. Clustering requires a designated master to orchestrate the slave transformations.","triggerScenarios":"executeClustered()/masterSlaveServer()/cleanupCluster() call getMasterServer() when the transformation either has no clustered steps at all, or its cluster schema has no slave server flagged as master.","commonSituations":"Running a clustered execution where the schema definition lists slave servers but none is checked as 'master'; steps lost their cluster schema reference after editing the transformation; calling executeClustered on a transformation that was never clustered.","solutions":["Mark one slave server in the cluster schema as the master (schema.setMasterSlaveServer(...) or check 'Master' in the schema dialog).","Verify the steps in the transformation reference a cluster schema that actually has slave servers configured.","Confirm getClusterSchema() is not null on at least one step before calling executeClustered()."],"exampleFix":"// before\nClusterSchema schema = new ClusterSchema(slaves, null); // no master\n// after\nClusterSchema schema = new ClusterSchema(slaves, slaves.get(0)); // master set","handlingStrategy":"validation","validationCode":"boolean hasMaster = false;\nfor (StepMeta step : transMeta.getSteps()) {\n  ClusterSchema cs = step.getClusterSchema();\n  if (cs != null && cs.findMaster() != null) { hasMaster = true; break; }\n}\nif (!hasMaster) throw new IllegalStateException(\"Cluster schema needs a master slave server\");","typeGuard":null,"tryCatchPattern":"try { transSplitter.executeClustered(); }\ncatch (KettleException e) { if (e.getMessage().contains(\"No master server\")) { configureMasterAndRetry(); } else throw e; }","preventionTips":["Always designate a master in the cluster schema dialog","Verify steps still reference the cluster schema after edits","Smoke-test clustering on a 2-node schema first"],"tags":["kettle","clustering","master-server","configuration"],"backgroundTag":"resource-not-found","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"}