{"record":{"id":"f51c46ce5346de57","repo":"hyperledger/fabric","slug":"no-endorsement-combination-can-be-satisfied","errorCode":null,"errorMessage":"no endorsement combination can be satisfied","messagePattern":"no endorsement combination can be satisfied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"discovery/client/client.go","lineNumber":280,"sourceCode":"\t}]\n\n\tif !exists {\n\t\treturn nil, ErrNotFound\n\t}\n\n\tdesc := res.(*endorsementDescriptor)\n\tvar seed [32]byte\n\t_, _ = crand.Read(seed[:])\n\tr := rand.New(rand.NewChaCha8(seed))\n\t// We iterate over all layouts to find one that we have enough peers to select\n\tfor _, index := range r.Perm(len(desc.layouts)) {\n\t\tlayout := desc.layouts[index]\n\t\tendorsers, canLayoutBeSatisfied := selectPeersForLayout(desc.endorsersByGroups, layout, f)\n\t\tif canLayoutBeSatisfied {\n\t\t\treturn endorsers, nil\n\t\t}\n\t}\n\treturn nil, errors.New(\"no endorsement combination can be satisfied\")\n}\n\ntype filter struct {\n\tef ExclusionFilter\n\tps PrioritySelector\n}\n\n// NewFilter returns an endorser filter that uses the given exclusion filter and priority selector\n// to filter and sort the endorsers\nfunc NewFilter(ps PrioritySelector, ef ExclusionFilter) Filter {\n\treturn &filter{\n\t\tef: ef,\n\t\tps: ps,\n\t}\n}\n\n// Filter returns a filtered and sorted list of endorsers\nfunc (f *filter) Filter(endorsers Endorsers) Endorsers {","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/discovery/client/client.go#L262-L298","documentation":"Endorsers in discovery/client/client.go:280 selects endorsers for a chaincode by evaluating each endorsement layout (group-to-count requirements) against available peers via selectPeersForLayout. If no layout can be satisfied with the given filter, it returns errors.New(\"no endorsement combination can be satisfied\").","triggerScenarios":"Calling Endorsers when for every layout in the chaincode's endorsement policy descriptor, no combination of peers from the required groups passes the ExclusionFilter or meets the required count.","commonSituations":"Too few peers online in one of the policy's required org groups; custom exclusion filters rejecting all candidates (e.g. filtering out peers without the chaincode); chaincode endorsement policy requiring orgs that have no endorsing peers; peers not yet synced via gossip.","solutions":["Relax or fix the ExclusionFilter passed to Endorsers so it doesn't eliminate all eligible peers","Ensure at least the policy-required number of peers per org group are online and have the chaincode installed","Verify the chaincode endorsement policy (or --signature-policy) matches the network's actual membership","Retry after gossip has propagated membership/ledger heights for recently started peers"],"exampleFix":"// before: filter rejecting every peer\nf := discovery.Filter{ExclusionFilter: filters.SelectAllExclusionFilter{}}\n\n// after: exclude only peers without the chaincode\nf := discovery.Filter{\n    ExclusionFilter: filters.HasChaincode(ccName).Negate(),\n}","handlingStrategy":"fallback","validationCode":"// Ensure each org group required by the policy has online peers\nif len(onlinePeersByOrg) < requiredCountForEveryGroup {\n    return errors.New(\"insufficient online endorsing peers for policy\")\n}","typeGuard":null,"tryCatchPattern":"endorsers, err := client.Endorsers(ctx, ccName, auth, filter, priority)\nif err != nil && strings.Contains(err.Error(), \"no endorsement combination can be satisfied\") {\n    // retry with a relaxed filter or wait for peers to come online\n}","preventionTips":["Keep at least the policy-required peers per org online with the chaincode installed","Use exclusion filters that match reality (exclude only peers without the chaincode)","Review the chaincode endorsement policy against actual network membership","Wait for gossip membership/ledger sync before selecting endorsers on fresh peers"],"tags":["hyperledger-fabric","discovery-client","endorsement-policy","peer-selection"],"backgroundTag":"no-endorsement-combination-satisfied","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"}