pentaho/pentaho-kettle · error · KettleException
ClusterSchema.NoSlaveServerDefined
Error message
ClusterSchema.NoSlaveServerDefined
What it means
Thrown by ClusterSchema.findMaster when the cluster schema has no slave servers at all (slaveServers is empty). Since even a master is registered as a slave-server entry, an empty list means the cluster is not configured.
Solutions
- Add at least one slave server (with one marked master) to the cluster schema
- Verify the transformation references the intended cluster schema
- Check that the schema's slaves were actually saved in the repository before running clustered
Example fix
// before: empty schema used for clustering ClusterSchema schema = new ClusterSchema(); transMeta.setClusterSchemas(Arrays.asList(schema)); // after: populate schema before use schema.setSlaveServers(Arrays.asList(master, slave1)); master.setMaster(true); transMeta.setClusterSchemas(Arrays.asList(schema));
Defensive patterns
Strategy: validation
Validate before calling
// Before clustering, verify slaves exist
if (clusterSchema.getSlaveServers() == null || clusterSchema.getSlaveServers().isEmpty()) {
throw new KettleException("Cluster schema '" + clusterSchema.getName() + "' has no slaves"); } Type guard
boolean hasSlaves(ClusterSchema s) { return s != null && s.getSlaveServers() != null && !s.getSlaveServers().isEmpty(); } Try / catch
try { SlaveServer master = clusterSchema.findMaster(); }
catch (KettleException e) { throw new IllegalStateException("Cluster schema empty — add slaves and a master", e); } Prevention
- Populate the cluster schema with slaves before attaching it to a transformation
- Confirm schema persistence in the repository (slaves saved)
- Double-check the transformation references the intended cluster schema
When it happens
Trigger: findMaster is called on a ClusterSchema whose slaveServers list is empty — e.g. a transformation partitioned onto a cluster schema that was never populated with slave servers.
Common situations: Cluster schema created but no slave servers added; wrong cluster schema attached to the transformation; schema fields not saved in the repository metadata.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- At this time we don't support the use of multiple cluster…
- ClusterSchema.NoMasterServerDefined
- It doesn't make sense to have a partitioned, clustered step…
- No master server could be found in the original…
- You always need at least one master in a cluster schema.
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1330b67ff4be6c8e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/cluster/ClusterSchema.java:282
/**
* @param basePort
* the basePort to set
*/
public void setBasePort( String basePort ) {
this.basePort = basePort;
}
public SlaveServer findMaster() throws KettleException {
for ( int i = 0; i < slaveServers.size(); i++ ) {
SlaveServer slaveServer = slaveServers.get( i );
if ( slaveServer.isMaster() ) {
return slaveServer;
}
}
if ( slaveServers.size() > 0 ) {
throw new KettleException( BaseMessages.getString( PKG, "ClusterSchema.NoMasterServerDefined", name ) );
}
throw new KettleException( BaseMessages.getString( PKG, "ClusterSchema.NoSlaveServerDefined", name ) );
}
/**
* @return The number of slave servers, excluding the master server
*/
public int findNrSlaves() {
int nr = 0;
for ( int i = 0; i < slaveServers.size(); i++ ) {
SlaveServer slaveServer = slaveServers.get( i );
if ( !slaveServer.isMaster() ) {
nr++;
}
}
return nr;
}
/**
* @return the socketFlushIntervalView on GitHub (pinned to f3058517a1)