hyperledger/fabric · error

[channel %s] cannot create channel because ChannelConfig is

Error message

[channel %s] cannot create channel because ChannelConfig is missing OrdererConfig

What it means

This error is thrown by the peer's createChannel when the channel's config bundle has no OrdererConfig. A Hyperledger Fabric channel must carry an Orderer group in its configuration so the peer can wire ordering-service callbacks (gossip config updates, etc.); if the configtx was built without an orderer section, the peer refuses to create the channel.

Source

Thrown at core/peer/peer.go:257

	legacyLifecycleValidation plugindispatcher.LifecycleResources,
	newLifecycleValidation plugindispatcher.CollectionAndLifecycleResources,
) error {
	chanConf, err := RetrievePersistedChannelConfig(l)
	if err != nil {
		return err
	}

	bundle, err := channelconfig.NewBundle(cid, chanConf, p.CryptoProvider)
	if err != nil {
		return err
	}

	capabilitiesSupportedOrPanic(bundle)

	channelconfig.LogSanityChecks(bundle)

	if _, ok := bundle.OrdererConfig(); !ok {
		return errors.Errorf("[channel %s] cannot create channel because ChannelConfig is missing OrdererConfig", bundle.ConfigtxValidator().ChannelID())
	}

	gossipEventer := p.GossipService.NewConfigEventer()

	gossipCallbackWrapper := func(bundle *channelconfig.Bundle) {
		ac, ok := bundle.ApplicationConfig()
		if !ok {
			ac = nil
		}
		gossipEventer.ProcessConfigUpdate(gossipservice.ConfigUpdate{
			ChannelID:        bundle.ConfigtxValidator().ChannelID(),
			Organizations:    ac.Organizations(),
			OrdererAddresses: bundle.ChannelConfig().OrdererAddresses(),
			Sequence:         bundle.ConfigtxValidator().Sequence(),
		})
		p.GossipService.SuspectPeers(func(identity api.PeerIdentityType) bool {
			// TODO: this is a place-holder that would somehow make the MSP layer suspect
			// that a given certificate is revoked, or its intermediate CA is revoked.

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Regenerate the channel genesis/create-tx from a configtx.yaml profile that includes a valid Orderer section with at least one orderer organization and consenters
  2. Verify the profile referenced by `configtxgen -profile` has `Orderer:` configured and Orderer organizations listed under `Organizations`
  3. Validate the produced block: the config should contain an Orderer group (check with `configtxlator` / `jq`) before submitting createChannel
  4. Ensure the consortium/profile references orderer orgs defined in the same configtx.yaml

Example fix

# before (configtx.yaml profile missing orderer)
Profiles:
  MyChannel:
    Application:
      Organizations: [Org1]
# after
Profiles:
  MyChannel:
    Orderer:
      OrdererType: etcdraft
      Organizations: [OrdererOrg]
    Application:
      Organizations: [Org1]
Defensive patterns

Strategy: validation

Validate before calling

bundle, ok := channelconfig.NewBundleFromConfigEnv(...) // or from fetched config
if _, ok := bundle.OrdererConfig(); !ok {
    return fmt.Errorf("channel %s config is missing OrdererConfig; regenerate genesis from a profile with an Orderer section", bundle.ConfigtxValidator().ChannelID())
}

Type guard

func hasOrdererConfig(b *channelconfig.Bundle) bool {
    _, ok := b.OrdererConfig()
    return ok
}

Try / catch

if err := peer.CreateChannel(cid, block, cert); err != nil {
    if strings.Contains(err.Error(), "missing OrdererConfig") {
        // rebuild channel config with Orderer section and retry
    }
    return err
}

Prevention

When it happens

Trigger: Calling peer.CreateChannel / Initialize for a channel whose configtx.yaml genesis block lacks an Orderer group (no orderer organizations/consenter set), e.g. a config generated with Orderer section omitted or an application-only channel profile.

Common situations: Using a configtx profile with `Orderer: ~` omitted, generating an application channel genesis without consenter info, upgrading Fabric versions where channel creation now requires OrdererConfig, or hand-crafting a channel create tx with only Application/Consortium settings.

Related errors


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