{"record":{"id":"e5a881e36900b3ac","repo":"aeron-io/aeron","slug":"memberid-not-found-in-arrays-tostring-clustermembers","errorCode":null,"errorMessage":"${memberId} not found in ${Arrays.toString(clusterMembers)}","messagePattern":"(.+?) not found in (.+?)","errorType":"exception","errorClass":"ClusterException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java","lineNumber":564,"sourceCode":"                    NULL_TIMESTAMP,\n                    NULL_VALUE,\n                    RecordingLog.ENTRY_TYPE_TERM,\n                    null,\n                    true,\n                    -1);\n            }\n\n            timeOfLastBackupQueryMs = 0;\n            this.correlationId = NULL_VALUE;\n            leaderCommitPositionCounterId = commitPositionCounterId;\n\n            clusterMembers = ClusterMember.parse(backupResponseDecoder.clusterMembers());\n            ClusterMember.setIsLeader(clusterMembers, leaderMemberId);\n\n            logSupplierMember = ClusterMember.findMember(clusterMembers, memberId);\n            if (null == logSupplierMember)\n            {\n                throw new ClusterException(memberId + \" not found in \" + Arrays.toString(clusterMembers));\n            }\n\n            logSupplierMember.leadershipTermId(logLeadershipTermId);\n\n            if (null != eventsListener)\n            {\n                eventsListener.onBackupResponse(clusterMembers, logSupplierMember, snapshotsToRetrieve);\n            }\n\n            if (null == clusterArchive)\n            {\n                CloseHelper.close(clusterArchiveAsyncConnect);\n\n                final AeronArchive.Context context = ctx.clusterArchiveContext().clone();\n                final ChannelUri logSupplierArchiveUri = ChannelUri.parse(context.controlRequestChannel());\n                logSupplierArchiveUri.put(ENDPOINT_PARAM_NAME, logSupplierMember.archiveEndpoint());\n                context.controlRequestChannel(logSupplierArchiveUri.toString());\n","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java#L546-L582","documentation":"After a BackupResponse, the agent parses the cluster member list and looks up its own memberId to identify the log supplier. If the memberId is not present in the returned member list, the configuration is inconsistent with the cluster and a ClusterException is thrown naming the id and members.","triggerScenarios":"The configured memberId for the backup does not correspond to any member advertised by the leader in the BackupResponse clusterMembers string — e.g. backup pointed at the wrong cluster, or memberId set manually to a value the cluster does not know.","commonSituations":"Reusing a backup configuration copied from another cluster; stale cluster member configuration after membership changes; typo in memberId property.","solutions":["Correct the memberId in the ClusterBackup.Context to one present in the cluster's member list.","Point the backup at the correct cluster endpoints for the intended cluster.","Update the cluster's member configuration if the backup is a legitimate new member that the leader must advertise."],"exampleFix":"// before\nctx.memberId(7); // cluster only has members 0-2\n// after\nctx.memberId(2); // must exist in the leader-reported clusterMembers","handlingStrategy":"validation","validationCode":"// verify memberId appears in the configured cluster members before launching\nboolean known = ClusterMember.parse(Backup.Configuration.clusterMembers())\n    .stream().anyMatch(m -> m.id() == memberId);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep backup memberId config in sync with cluster membership","Validate configs after any cluster membership change"],"tags":["aeron","cluster","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}