hyperledger/fabric · error
Disallowed channel group: %s
Error message
Disallowed channel group: %s
What it means
NewChannelConfig only accepts four sub-groups under the Channel group: Application, Orderer, Consortiums (and skips others it handles); any other group name hits the default case and returns "Disallowed channel group: %s". It guards against unknown or misspelled groups being smuggled into channel configuration, which would otherwise be silently ignored.
Source
Thrown at common/channelconfig/channel.go:111
channelCapabilities := cc.Capabilities()
if err := cc.Validate(channelCapabilities); err != nil {
return nil, err
}
mspConfigHandler := NewMSPConfigHandler(channelCapabilities.MSPVersion(), bccsp)
var err error
for groupName, group := range channelGroup.Groups {
switch groupName {
case ApplicationGroupKey:
cc.appConfig, err = NewApplicationConfig(group, mspConfigHandler)
case OrdererGroupKey:
cc.ordererConfig, err = NewOrdererConfig(group, mspConfigHandler, channelCapabilities)
case ConsortiumsGroupKey:
cc.consortiumsConfig, err = NewConsortiumsConfig(group, mspConfigHandler)
default:
return nil, fmt.Errorf("Disallowed channel group: %s", group)
}
if err != nil {
return nil, errors.Wrapf(err, "could not create channel %s sub-group config", groupName)
}
}
if cc.mspManager, err = mspConfigHandler.CreateMSPManager(); err != nil {
return nil, err
}
return cc, nil
}
// MSPManager returns the MSP manager for this config
func (cc *ChannelConfig) MSPManager() msp.MSPManager {
return cc.mspManager
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Rename the offending group to one of the allowed keys (Application, Orderer, Consortiums) or delete it from the config
- Regenerate the config with configtxgen to guarantee only recognized groups appear
- Check group names case-sensitively in the decoded config (`configtxlator proto_decode`) before submitting
Example fix
// before
config.ChannelGroup.Groups["Orderers"] = &cb.ConfigGroup{} // disallowed
// after
config.ChannelGroup.Groups["Orderer"] = &cb.ConfigGroup{} // allowed key Defensive patterns
Strategy: validation
Validate before calling
var allowedChannelGroups = map[string]bool{"Application": true, "Orderer": true, "Consortiums": true}
for name := range channelGroup.Groups {
if !allowedChannelGroups[name] {
return fmt.Errorf("pre-check: disallowed channel group %q", name)
}
} Try / catch
cc, err := channelconfig.NewChannelConfig(channelGroup, bccsp)
if err != nil {
if strings.HasPrefix(err.Error(), "Disallowed channel group") {
return fmt.Errorf("remove or rename the unknown group before retrying: %w", err)
}
return err
} Prevention
- Only create groups with the exact keys Application, Orderer, Consortiums
- Check case sensitivity when editing decoded configs
- Prefer configtxgen-generated configs over hand-built ones
When it happens
Trigger: Iterating channelGroup.Groups where a key is not ApplicationGroupKey, OrdererGroupKey, or ConsortiumsGroupKey — e.g. a group named "orderer" (wrong case), "Consortium", "Peer", or a leftover group from config edits.
Common situations: Hand-editing decoded configtxlator output and adding a custom group; misspelling a standard group key; fabricating config envelopes in tests with arbitrary group names; tooling that merges unrelated config groups into the channel group.
Related errors
- config must contain a channel group
- cannot enable channel capabilities without orderer support f
- cannot enable application capabilities without orderer suppo
- failed to deserialize values
- could not create channel %s sub-group config
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/97edaaf6cb25f1af.
Report an issue: GitHub.