{"record":{"id":"b633d107b5aa0354","repo":"hyperledger/fabric","slug":"required-to-disseminate-to-at-least-d-peers-but","errorCode":null,"errorMessage":"required to disseminate to at least %d peers, but know of only %d eligible peers","messagePattern":"required to disseminate to at least (.+?) peers, but know of only (.+?) eligible peers","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gossip/privdata/distributor.go","lineNumber":238,"sourceCode":"\t\treturn colFilter(protoutil.SignedData{\n\t\t\tData:      signature.Message,\n\t\t\tSignature: signature.Signature,\n\t\t\tIdentity:  signature.PeerIdentity,\n\t\t})\n\t})\n\tif err != nil {\n\t\td.logger.Error(\"Failed to retrieve peer routing filter for channel\", d.chainID, \":\", err)\n\t\treturn nil, err\n\t}\n\n\tm := pvtDataMsg.GetPrivateData().Payload\n\n\teligiblePeers := d.eligiblePeersOfChannel(routingFilter)\n\n\t// With the shift to per peer dissemination in FAB-15389, we must first check\n\t// that there are enough eligible peers to satisfy RequiredPeerCount.\n\tif len(eligiblePeers) < colAP.RequiredPeerCount() {\n\t\treturn nil, errors.Errorf(\"required to disseminate to at least %d peers, but know of only %d eligible peers\", colAP.RequiredPeerCount(), len(eligiblePeers))\n\t}\n\n\t// Group eligible peers by org so that we can disseminate across orgs first\n\tidentitySetsByOrg := d.identitiesOfEligiblePeersByOrg(eligiblePeers, colAP)\n\n\t// peerEndpoints are used for dissemination debug only\n\tpeerEndpoints := map[string]string{}\n\tfor _, peer := range eligiblePeers {\n\t\tepToAdd := peer.Endpoint\n\t\tif epToAdd == \"\" {\n\t\t\tepToAdd = peer.InternalEndpoint\n\t\t}\n\t\tpeerEndpoints[string(peer.PKIid)] = epToAdd\n\t}\n\n\t// Initialize maximumPeerRemainingCount and requiredPeerRemainingCount,\n\t// these will be decremented until we've selected enough peers for dissemination\n\tmaximumPeerRemainingCount := colAP.MaximumPeerCount()","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/gossip/privdata/distributor.go#L220-L256","documentation":"Since FAB-15389 the check runs before disseminating: the number of eligible peers on the channel must be at least RequiredPeerCount of the collection policy. If fewer peers qualify, dissemination cannot satisfy the policy and fails fast.","triggerScenarios":"disseminationPlanForMsg finds len(eligiblePeers) < colAP.RequiredPeerCount() — the channel membership after the collection's routing filter is smaller than the policy's required peer count.","commonSituations":"Small network or many peers down so too few peers in the collection's member orgs are connected; RequiredPeerCount configured higher than the number of orgs/peers in the collection; gossip membership not yet converged at startup.","solutions":["Lower requiredPeerCount (and maxPeerCount) in the collection definition to fit the deployed network size","Ensure enough peers of the member orgs are running, joined to the channel, and connected via gossip","Wait for gossip membership to converge / fix gossip bootstrap if peers know of no one"],"exampleFix":"// before (collections_config.json)\n\"requiredPeerCount\": 3,\n// after (only 2 eligible peers exist)\n\"requiredPeerCount\": 1","handlingStrategy":"validation","validationCode":"if uint32(len(eligiblePeers)) < requiredPeerCount {\n  return fmt.Errorf(\"need %d peers, have %d\", requiredPeerCount, len(eligiblePeers))\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"eligible peers\") {\n  // scale network or lower requiredPeerCount\n}","preventionTips":["Set requiredPeerCount no higher than the smallest collection org's peer count","Monitor gossip membership; ensure collection-member peers stay up"],"tags":["hyperledger-fabric","gossip","private-data","membership"],"backgroundTag":"not-enough-eligible-peers","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}