{"record":{"id":"5e563a9d535a2eb7","repo":"hyperledger/fabric","slug":"system-channel-consortiums-group-appears-to-have-n","errorCode":null,"errorMessage":"system channel consortiums group appears to have no consortiums defined","messagePattern":"system channel consortiums group appears to have no consortiums defined","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":522,"sourceCode":"\ttemplate := proto.Clone(cg).(*cb.ConfigGroup)\n\tif template.Groups == nil {\n\t\treturn nil, errors.Errorf(\"supplied system channel group has no sub-groups\")\n\t}\n\n\ttemplate.Groups[channelconfig.ApplicationGroupKey] = &cb.ConfigGroup{\n\t\tGroups: map[string]*cb.ConfigGroup{},\n\t\tPolicies: map[string]*cb.ConfigPolicy{\n\t\t\tchannelconfig.AdminsPolicyKey: {},\n\t\t},\n\t}\n\n\tconsortiums, ok := template.Groups[channelconfig.ConsortiumsGroupKey]\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"supplied system channel group does not appear to be system channel (missing consortiums group)\")\n\t}\n\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}","sourceCodeStart":504,"sourceCodeEnd":540,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L504-L540","documentation":"After finding the Consortiums group, ConfigTemplateFromGroup requires it to actually contain consortium entries. If its Groups map is nil, the system channel was created without any consortiums defined, and the profile's Consortium reference cannot be resolved, so this error is thrown.","triggerScenarios":"Calling ConfigTemplateFromGroup / MakeChannelCreationTransactionWithSystemChannelContext against a system channel whose Consortiums group has no consortium sub-groups — i.e. the genesis profile's Consortiums section was empty or absent.","commonSituations":"System channel generated from a configtx.yaml without a Consortiums section; regenerating the system channel after removing consortiums while still creating channels that need them.","solutions":["Add a Consortiums section (e.g. SampleConsortium listing member orgs) to the system channel profile and regenerate/apply the system channel config update.","Set conf.Consortium to an existing consortium and re-check the system channel's consortium definitions.","Inspect the system channel config to confirm consortiums exist."],"exampleFix":"# before\nProfiles:\n  OrdererGenesis:\n    Orderer:\n      ...\n    # no Consortiums\n# after\nProfiles:\n  OrdererGenesis:\n    Orderer:\n      ...\n    Consortiums:\n      SampleConsortium:\n        Organizations:\n          - *Org1","handlingStrategy":"validation","validationCode":"consortiums := cg.Groups[channelconfig.ConsortiumsGroupKey]\nif consortiums == nil || len(consortiums.Groups) == 0 {\n    return errors.New(\"system channel defines no consortiums; add a Consortiums section to the genesis profile\")\n}","typeGuard":"func hasConsortiumsDefined(cg *cb.ConfigGroup) bool {\n    c, ok := cg.Groups[channelconfig.ConsortiumsGroupKey]\n    return ok && c.Groups != nil && len(c.Groups) > 0\n}","tryCatchPattern":"tmpl, err := encoder.ConfigTemplateFromGroup(profile, cg)\nif err != nil && strings.Contains(err.Error(), \"no consortiums defined\") {\n    return errors.New(\"regenerate the system channel with a Consortiums section\")\n}","preventionTips":["Always include at least one consortium (e.g. SampleConsortium) in the system channel profile.","Inspect the running system channel config before programmatic channel creation.","Keep the profile's Consortium value pointing at a consortium present in the system channel."],"tags":["hyperledger-fabric","configtx","consortiums","system-channel"],"backgroundTag":"invalid-system-channel-group","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"}