{"record":{"id":"8356199b76644905","repo":"hyperledger/fabric","slug":"failed-to-find-any-endorsing-peers-for-org-s-s","errorCode":null,"errorMessage":"failed to find any endorsing peers for org(s): %s","messagePattern":"failed to find any endorsing peers for org\\(s\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pkg/gateway/registry.go","lineNumber":179,"sourceCode":"// planForOrgs generates an endorsement plan with a single layout requiring one peer from each of the given orgs for the given chaincode on a channel.\nfunc (reg *registry) planForOrgs(channel string, chaincode string, endorsingOrgs []string) (*plan, error) {\n\tendorsersByOrg := reg.endorsersByOrg(channel, chaincode)\n\n\trequired := map[string]int{}\n\tgroupEndorsers := map[string][]*endorser{}\n\tmissingOrgs := []string{}\n\tfor _, org := range endorsingOrgs {\n\t\tif es, ok := endorsersByOrg[org]; ok {\n\t\t\tfor _, e := range es {\n\t\t\t\tgroupEndorsers[org] = append(groupEndorsers[org], e.endorser)\n\t\t\t}\n\t\t\trequired[org] = 1\n\t\t} else {\n\t\t\tmissingOrgs = append(missingOrgs, org)\n\t\t}\n\t}\n\tif len(missingOrgs) > 0 {\n\t\treturn nil, fmt.Errorf(\"failed to find any endorsing peers for org(s): %s\", strings.Join(missingOrgs, \", \"))\n\t}\n\n\treturn newPlan([]*layout{{required: required}}, groupEndorsers), nil\n}\n\nfunc (reg *registry) endorsersByOrg(channel string, chaincode string) map[string][]*endorserState {\n\tendorsersByOrg := make(map[string][]*endorserState)\n\n\tfor _, member := range reg.channelMembers(channel) {\n\t\tendorser := reg.lookupEndorser(member.PreferredEndpoint(), member.PKIid, channel)\n\t\tif endorser == nil {\n\t\t\tcontinue\n\t\t}\n\t\tif reg.hasChaincode(member, chaincode) {\n\t\t\tendorsersByOrg[endorser.mspid] = append(endorsersByOrg[endorser.mspid], &endorserState{endorser: endorser, height: member.Properties.GetLedgerHeight()})\n\t\t}\n\t}\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/pkg/gateway/registry.go#L161-L197","documentation":"Gateway planForOrgs: one or more of the organizations named in endorsingOrgs has no discovered endorsing peers for the chaincode on the channel, so a layout with one peer from each requested org cannot be built. The message lists the missing org(s).","triggerScenarios":"Thrown at internal/pkg/gateway/registry.go:179 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the org names passed in the request are correct","Ensure peers of those orgs have joined the channel and run the chaincode","Wait/retry until discovery reports endorsers for those orgs"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}