hyperledger/fabric · error

supplied system channel group is missing '%s' consortium

Error message

supplied system channel group is missing '%s' consortium

What it means

ConfigTemplateFromGroup builds a channel-creation config template from the system channel's genesis config. Before doing so it looks up the consortium named in the channel-creation profile under the system channel's ConsortiumsGroup. This error is thrown when the named consortium does not exist in the system channel group, so no template can be derived.

Source

Thrown at internal/configtxgen/encoder/encoder.go:527

	template.Groups[channelconfig.ApplicationGroupKey] = &cb.ConfigGroup{
		Groups: map[string]*cb.ConfigGroup{},
		Policies: map[string]*cb.ConfigPolicy{
			channelconfig.AdminsPolicyKey: {},
		},
	}

	consortiums, ok := template.Groups[channelconfig.ConsortiumsGroupKey]
	if !ok {
		return nil, errors.Errorf("supplied system channel group does not appear to be system channel (missing consortiums group)")
	}

	if consortiums.Groups == nil {
		return nil, errors.Errorf("system channel consortiums group appears to have no consortiums defined")
	}

	consortium, ok := consortiums.Groups[conf.Consortium]
	if !ok {
		return nil, errors.Errorf("supplied system channel group is missing '%s' consortium", conf.Consortium)
	}

	if conf.Application == nil {
		return nil, errors.Errorf("supplied channel creation profile does not contain an application section")
	}

	for _, organization := range conf.Application.Organizations {
		var ok bool
		template.Groups[channelconfig.ApplicationGroupKey].Groups[organization.Name], ok = consortium.Groups[organization.Name]
		if !ok {
			return nil, errors.Errorf("consortium %s does not contain member org %s", conf.Consortium, organization.Name)
		}
	}
	delete(template.Groups, channelconfig.ConsortiumsGroupKey)

	addValue(template, channelconfig.ConsortiumValue(conf.Consortium), channelconfig.AdminsPolicyKey)

	return template, nil

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Set the channel-creation profile's Consortium field to exactly match a consortium defined in the system channel profile's Consortiums section in configtx.yaml
  2. Verify the system channel profile actually defines the consortium: run `configtxgen -printOrg` or inspect the printed system channel genesis block (showconfig) for the Consortiums group
  3. Regenerate the system channel genesis block after fixing configtx.yaml and restart/redeploy the orderer with the corrected genesis
  4. Check for case/whitespace mismatches in the consortium name; keys are case-sensitive

Example fix

// before (configtx.yaml)
ChannelCreationProfile:
  Consortium: SampleConsrtium
// after
ChannelCreationProfile:
  Consortium: SampleConsortium
Defensive patterns

Strategy: validation

Validate before calling

// Go: check the consortium exists in the system channel group before creating the tx
if consortiums, ok := sysChanGroup.Groups[channelconfig.ConsortiumsGroupKey]; !ok || consortiums.Groups[profile.Consortium] == nil {
    return fmt.Errorf("system channel does not define consortium %q", profile.Consortium)
}

Type guard

func consortiumDefined(sysChanGroup *cb.ConfigGroup, name string) bool {
    cs, ok := sysChanGroup.Groups[channelconfig.ConsortiumsGroupKey]
    return ok && cs.Groups[name] != nil
}

Try / catch

if err != nil {
    if strings.Contains(err.Error(), "is missing") && strings.Contains(err.Error(), "consortium") {
        return fmt.Errorf("check configtx.yaml: consortium in profile not defined in system channel: %w", err)
    }
    return err
}

Prevention

When it happens

Trigger: Calling MakeChannelCreationTransaction(WithSystemChannelContext) or ConfigTemplateFromGroup with a profile whose Consortium field names a consortium that is absent from the system channel's config (Consortiums > Groups map), or when the consortiums group exists but the lookup key mismatches (case-sensitive).

Common situations: configtx.yaml channel-creation profile references a consortium name that differs from the one defined in the system channel profile (typo, renamed consortium, e.g. 'SampleConsortium' vs 'MyConsortium'); profile lacks a Consortiums section; stale configtx.yaml after reorganizing profiles.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/aa034d6ed11ca007. Report an issue: GitHub.