{"record":{"id":"1dd5fe70995471de","repo":"pentaho/pentaho-kettle","slug":"slaveserver-slavecouldnotbefound","errorCode":"SlaveServer.SlaveCouldNotBeFound","errorMessage":"Internal repository error: slave server with id [{0}] could not be found!","messagePattern":"Internal repository error: slave server with id \\[(.+?)\\] could not be found!","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositorySlaveServerDelegate.java","lineNumber":109,"sourceCode":"        // There are no naming collisions (either it is the same object or the name is unique)\n        updateSlave( slaveServer );\n      }\n    }\n\n    // Save the trans-slave relationship too.\n    if ( id_transformation != null && isUsedByTransformation ) {\n      repository.insertTransformationSlave( id_transformation, slaveServer.getObjectId() );\n    }\n  }\n\n  public SlaveServer loadSlaveServer( ObjectId id_slave_server ) throws KettleException {\n    SlaveServer slaveServer = new SlaveServer();\n\n    slaveServer.setObjectId( id_slave_server );\n\n    RowMetaAndData row = getSlaveServer( id_slave_server );\n    if ( row == null ) {\n      throw new KettleDatabaseException( BaseMessages.getString(\n        PKG, \"SlaveServer.SlaveCouldNotBeFound\", id_slave_server.toString() ) );\n    }\n\n    slaveServer.setName( row.getString( KettleDatabaseRepository.FIELD_SLAVE_NAME, null ) );\n    slaveServer.setHostname( row.getString( KettleDatabaseRepository.FIELD_SLAVE_HOST_NAME, null ) );\n    slaveServer.setPort( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PORT, null ) );\n    slaveServer.setWebAppName( row.getString( KettleDatabaseRepository.FIELD_SLAVE_WEB_APP_NAME, null ) );\n    slaveServer.setUsername( row.getString( KettleDatabaseRepository.FIELD_SLAVE_USERNAME, null ) );\n    slaveServer.setPassword( Encr.decryptPasswordOptionallyEncrypted( row.getString(\n      KettleDatabaseRepository.FIELD_SLAVE_PASSWORD, null ) ) );\n    slaveServer.setProxyHostname( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PROXY_HOST_NAME, null ) );\n    slaveServer.setProxyPort( row.getString( KettleDatabaseRepository.FIELD_SLAVE_PROXY_PORT, null ) );\n    slaveServer.setNonProxyHosts( row.getString( KettleDatabaseRepository.FIELD_SLAVE_NON_PROXY_HOSTS, null ) );\n    slaveServer.setMaster( row.getBoolean( KettleDatabaseRepository.FIELD_SLAVE_MASTER, false ) );\n\n    return slaveServer;\n  }\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositorySlaveServerDelegate.java#L91-L127","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nSlaveServer slave = delegate.loadSlaveServer(id);\n// after\nSlaveServer slave;\ntry { slave = delegate.loadSlaveServer(id); }\ncatch (KettleDatabaseException e) {\n  log.warn(\"Slave \" + id + \" missing in repository; using fallback\");\n  slave = new SlaveServer(\"local\", \"localhost\", \"8080\", null, null); // fallback default\n}","handlingStrategy":"try-catch","validationCode":"RowMetaAndData row = repository.connectionDelegate.getOneRow(\"SELECT ID_SLAVE FROM R_SLAVE WHERE ID_SLAVE = ?\", id.longValue());\nif (row == null) throw new IllegalStateException(\"Slave \" + id + \" missing\");","typeGuard":"boolean slaveExists(KettleDatabaseRepository repo, ObjectId id) { try { return repo.loadSlaveServer(id, null) != null; } catch (Exception e) { return false; } }","tryCatchPattern":"try { slave = delegate.loadSlaveServer(id); } catch (KettleDatabaseException e) { log.warn(\"Slave \" + id + \" not found\"); slave = fallbackSlave(); }","preventionTips":["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"],"tags":["repository","slave-server","not-found","internal-error"],"backgroundTag":"record-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"}