{"record":{"id":"73ce07309a13d53f","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-all-slave-server-ids","errorCode":null,"errorMessage":"Unable to get all slave server IDs","messagePattern":"Unable to get all slave server IDs","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1651,"sourceCode":"    return securityManager;\n  }\n\n  @Override\n  public ObjectId getSlaveID( String name ) throws KettleException {\n    return getObjectID( name, RepositoryObjectType.SLAVE_SERVER );\n  }\n\n  @Override\n  public ObjectId[] getSlaveIDs( boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.SLAVE_SERVER, includeDeleted );\n      List<ObjectId> ids = new ArrayList<ObjectId>();\n      for ( RepositoryFile file : children ) {\n        ids.add( new StringObjectId( file.getId().toString() ) );\n      }\n      return ids.toArray( new ObjectId[ 0 ] );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get all slave server IDs\", e );\n    }\n  }\n\n  @Override\n  public String[] getSlaveNames( boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile> children = getAllFilesOfType( null, RepositoryObjectType.SLAVE_SERVER, includeDeleted );\n      List<String> names = new ArrayList<String>();\n      for ( RepositoryFile file : children ) {\n        names.add( file.getTitle() );\n      }\n      return names.toArray( new String[ 0 ] );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get all slave server names\", e );\n    }\n  }\n\n  @Override","sourceCodeStart":1633,"sourceCodeEnd":1669,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1633-L1669","documentation":"PurRepository.getSlaveServerIDs() maps slave-server repository files to ObjectId values and wraps any failure in this KettleException. The thrown error hides the underlying pur client exception as its cause.","triggerScenarios":"Calling getSlaveServerIDs(idDirectory, includeDeleted) when the pur getChildren call fails: invalid directory id, broken repository connection, deleted folder, or server-side error.","commonSituations":"Repository session invalidated after server restart; directory id from a different repository instance; network outage mid-call; folder renamed/deleted concurrently by another client.","solutions":["Inspect e.getCause() to identify the actual repository failure.","Verify the directory id belongs to the currently connected repository.","Reconnect to the repository and retry.","Confirm the Pentaho server is reachable and the user can read the folder."],"exampleFix":"// before\nObjectId[] ids = repo.getSlaveServerIDs(dirId, false);\n// after\ntry {\n  ObjectId[] ids = repo.getSlaveServerIDs(dirId, false);\n} catch (KettleException e) {\n  log.error(\"slave id listing failed\", e.getCause());\n  ensureConnected(repo); // reconnect if disconnected, then retry\n}","handlingStrategy":"try-catch","validationCode":"if (repo == null || !repo.isConnected()) throw new IllegalStateException(\"repository not connected\");\nif (dirId == null) throw new IllegalArgumentException(\"dirId required\");","typeGuard":"boolean usable(Repository repo) { try { return repo != null && repo.isConnected(); } catch (Throwable t) { return false; } }","tryCatchPattern":"try { return repo.getSlaveServerIDs(dirId, false); } catch (KettleException e) { log.error(\"cause: \", e.getCause()); return new ObjectId[0]; }","preventionTips":["Verify the directory id belongs to the active repository connection","Reconnect after server restarts","Check permissions on the folder before listing"],"tags":["kettle","repository","pur","metadata-listing"],"backgroundTag":"api-request-failed","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"}