{"record":{"id":"cc0daa349336c8bc","repo":"hyperledger/fabric","slug":"consortium-s-does-not-contain-member-org-s","errorCode":null,"errorMessage":"consortium %s does not contain member org %s","messagePattern":"consortium (.+?) does not contain member org (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":538,"sourceCode":"\n\tif consortiums.Groups == nil {\n\t\treturn nil, errors.Errorf(\"system channel consortiums group appears to have no consortiums defined\")\n\t}\n\n\tconsortium, ok := consortiums.Groups[conf.Consortium]\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"supplied system channel group is missing '%s' consortium\", conf.Consortium)\n\t}\n\n\tif conf.Application == nil {\n\t\treturn nil, errors.Errorf(\"supplied channel creation profile does not contain an application section\")\n\t}\n\n\tfor _, organization := range conf.Application.Organizations {\n\t\tvar ok bool\n\t\ttemplate.Groups[channelconfig.ApplicationGroupKey].Groups[organization.Name], ok = consortium.Groups[organization.Name]\n\t\tif !ok {\n\t\t\treturn nil, errors.Errorf(\"consortium %s does not contain member org %s\", conf.Consortium, organization.Name)\n\t\t}\n\t}\n\tdelete(template.Groups, channelconfig.ConsortiumsGroupKey)\n\n\taddValue(template, channelconfig.ConsortiumValue(conf.Consortium), channelconfig.AdminsPolicyKey)\n\n\treturn template, nil\n}\n\n// MakeChannelCreationTransaction is a handy utility function for creating transactions for channel creation.\n// It assumes the invoker has no system channel context so ignores all but the application section.\n// Deprecated\nfunc MakeChannelCreationTransaction(\n\tchannelID string,\n\tsigner identity.SignerSerializer,\n\tconf *genesisconfig.Profile,\n) (*cb.Envelope, error) {\n\ttemplate, err := DefaultConfigTemplate(conf)","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L520-L556","documentation":"After locating the consortium and the profile's Application section, ConfigTemplateFromGroup copies each application organization into the new channel's Application group by looking it up in the consortium's Groups map. This error is thrown when an org listed in the profile's Application.Organizations is not a member of the referenced consortium.","triggerScenarios":"Calling MakeChannelCreationTransaction(WithSystemChannelContext) where an organization named in the profile's Application.Organizations does not appear under the named consortium's Organizations in the system channel profile.","commonSituations":"Org added to an application channel profile before being added to the consortium; consortium name and org lists drifted after configtx.yaml edits; org name typo; two consortiums used interchangeably.","solutions":["Add the missing organization to the Consortium's Organizations list in the system channel profile in configtx.yaml","Or remove the org from the profile's Application.Organizations if it should not join the channel","Regenerate the system channel genesis block and retry channel creation","Verify org names match exactly (case-sensitive) between Consortium and Application Organizations lists"],"exampleFix":"// before (configtx.yaml)\nConsortiums:\n  SampleConsortium:\n    Organizations:\n      - Org1\nApplication:\n  Organizations:\n    - Org2\n// after\nConsortiums:\n  SampleConsortium:\n    Organizations:\n      - Org1\n      - Org2\nApplication:\n  Organizations:\n    - Org2","handlingStrategy":"validation","validationCode":"// Go: ensure every application org is a member of the consortium before creating the tx\nfor _, org := range profile.Application.Organizations {\n    if consortium.Groups[org.Name] == nil {\n        return fmt.Errorf(\"org %q is not a member of consortium %q\", org.Name, profile.Consortium)\n    }\n}","typeGuard":"func orgInConsortium(consortium *cb.ConfigGroup, orgName string) bool { return consortium.Groups[orgName] != nil }","tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"does not contain member org\") {\n        return fmt.Errorf(\"add the org to the Consortium's Organizations in configtx.yaml: %w\", err)\n    }\n    return err\n}","preventionTips":["Whenever adding an org to an application channel profile, add it to the consortium too","Cross-check Consortium vs Application Organizations lists in configtx.yaml reviews","Automate a preflight check that diffs the two lists"],"tags":["hyperledger-fabric","configtxgen","channel-creation","consortium-membership"],"backgroundTag":"config-resource-not-found","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"}