pentaho/pentaho-kettle · error · KettleDatabaseException
SlaveServer.SlaveCouldNotBeFound
SlaveServer.SlaveCouldNotBeFound
Error message
Internal repository error: slave server with id [{0}] could not be found! What it means
loadSlaveServer throws this KettleDatabaseException (message key SlaveServer.SlaveCouldNotBeFound) when getSlaveServer(id_slave_server) returns no row for the given ID. It indicates an internal inconsistency: an ID was referenced that does not exist in R_SLAVE.
Solutions
- Verify the ID exists: SELECT * FROM R_SLAVE WHERE ID_SLAVE = <id>
- Reload the transformation/cluster schema from the repository to refresh slave references
- Re-create the missing slave server definition, then retry the load
- Catch KettleDatabaseException and skip/log the missing slave instead of failing the whole load
Example fix
// before
SlaveServer slave = delegate.loadSlaveServer(id);
// after
SlaveServer slave;
try { slave = delegate.loadSlaveServer(id); }
catch (KettleDatabaseException e) {
log.warn("Slave " + id + " missing in repository; using fallback");
slave = new SlaveServer("local", "localhost", "8080", null, null); // fallback default
} Defensive patterns
Strategy: try-catch
Validate before calling
RowMetaAndData row = repository.connectionDelegate.getOneRow("SELECT ID_SLAVE FROM R_SLAVE WHERE ID_SLAVE = ?", id.longValue());
if (row == null) throw new IllegalStateException("Slave " + id + " missing"); Type guard
boolean slaveExists(KettleDatabaseRepository repo, ObjectId id) { try { return repo.loadSlaveServer(id, null) != null; } catch (Exception e) { return false; } } Try / catch
try { slave = delegate.loadSlaveServer(id); } catch (KettleDatabaseException e) { log.warn("Slave " + id + " not found"); slave = fallbackSlave(); } Prevention
- Re-create or repair cluster metadata after deleting slaves
- Never reuse ObjectIds across repositories
- Reload transformation metadata instead of trusting cached slave references
- Check for dangling R_SLAVE references after manual DB cleanup
When it happens
Trigger: Calling loadSlaveServer(id_slave_server) with an ID absent from R_SLAVE — dangling reference from a deleted slave, ID from a different repository, or corrupted cluster metadata in a transformation/job.
Common situations: A slave was deleted from the repository while transformations still reference it in cluster schema definitions; pointing at a test vs production repository; manual row deletion in the DB.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- AutoDoc.Exception.RepositoryDirectoryNotFound
- Could not find folder [ + id + ]
- Failed to create object in repository. Object
- Failed to save object to repository. Object
- I couldn't find Notepad with id_note=id_note in the…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1dd5fe70995471de.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositorySlaveServerDelegate.java:109
// There are no naming collisions (either it is the same object or the name is unique)
updateSlave( slaveServer );
}
}
// Save the trans-slave relationship too.
if ( id_transformation != null && isUsedByTransformation ) {
repository.insertTransformationSlave( id_transformation, slaveServer.getObjectId() );
}
}
public SlaveServer loadSlaveServer( ObjectId id_slave_server ) throws KettleException {
SlaveServer slaveServer = new SlaveServer();
slaveServer.setObjectId( id_slave_server );
RowMetaAndData row = getSlaveServer( id_slave_server );
if ( row == null ) {
throw new KettleDatabaseException( BaseMessages.getString(
PKG, "SlaveServer.SlaveCouldNotBeFound", id_slave_server.toString() ) );
}
slaveServer.setName( row.getString( KettleDatabaseRepository.FIELD_SLAVE_NAME, null ) );
slaveServer.setHostname( row.getString( KettleDatabaseRepository.FIELD_SLAVE_HOST_NAME, null ) );
slaveServer.setPort( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PORT, null ) );
slaveServer.setWebAppName( row.getString( KettleDatabaseRepository.FIELD_SLAVE_WEB_APP_NAME, null ) );
slaveServer.setUsername( row.getString( KettleDatabaseRepository.FIELD_SLAVE_USERNAME, null ) );
slaveServer.setPassword( Encr.decryptPasswordOptionallyEncrypted( row.getString(
KettleDatabaseRepository.FIELD_SLAVE_PASSWORD, null ) ) );
slaveServer.setProxyHostname( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PROXY_HOST_NAME, null ) );
slaveServer.setProxyPort( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PROXY_PORT, null ) );
slaveServer.setNonProxyHosts( row.getString( KettleDatabaseRepository.FIELD_SLAVE_NON_PROXY_HOSTS, null ) );
slaveServer.setMaster( row.getBoolean( KettleDatabaseRepository.FIELD_SLAVE_MASTER, false ) );
return slaveServer;
}
View on GitHub (pinned to f3058517a1)