{"record":{"id":"24595f9ab0c15ea7","repo":"hyperledger/fabric","slug":"channel-s-cannot-create-channel-because-channel","errorCode":null,"errorMessage":"[channel %s] cannot create channel because ChannelConfig is missing OrdererConfig","messagePattern":"\\[channel (.+?)\\] cannot create channel because ChannelConfig is missing OrdererConfig","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/peer/peer.go","lineNumber":257,"sourceCode":"\tlegacyLifecycleValidation plugindispatcher.LifecycleResources,\n\tnewLifecycleValidation plugindispatcher.CollectionAndLifecycleResources,\n) error {\n\tchanConf, err := RetrievePersistedChannelConfig(l)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbundle, err := channelconfig.NewBundle(cid, chanConf, p.CryptoProvider)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcapabilitiesSupportedOrPanic(bundle)\n\n\tchannelconfig.LogSanityChecks(bundle)\n\n\tif _, ok := bundle.OrdererConfig(); !ok {\n\t\treturn errors.Errorf(\"[channel %s] cannot create channel because ChannelConfig is missing OrdererConfig\", bundle.ConfigtxValidator().ChannelID())\n\t}\n\n\tgossipEventer := p.GossipService.NewConfigEventer()\n\n\tgossipCallbackWrapper := func(bundle *channelconfig.Bundle) {\n\t\tac, ok := bundle.ApplicationConfig()\n\t\tif !ok {\n\t\t\tac = nil\n\t\t}\n\t\tgossipEventer.ProcessConfigUpdate(gossipservice.ConfigUpdate{\n\t\t\tChannelID:        bundle.ConfigtxValidator().ChannelID(),\n\t\t\tOrganizations:    ac.Organizations(),\n\t\t\tOrdererAddresses: bundle.ChannelConfig().OrdererAddresses(),\n\t\t\tSequence:         bundle.ConfigtxValidator().Sequence(),\n\t\t})\n\t\tp.GossipService.SuspectPeers(func(identity api.PeerIdentityType) bool {\n\t\t\t// TODO: this is a place-holder that would somehow make the MSP layer suspect\n\t\t\t// that a given certificate is revoked, or its intermediate CA is revoked.","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/peer/peer.go#L239-L275","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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","Verify the profile referenced by `configtxgen -profile` has `Orderer:` configured and Orderer organizations listed under `Organizations`","Validate the produced block: the config should contain an Orderer group (check with `configtxlator` / `jq`) before submitting createChannel","Ensure the consortium/profile references orderer orgs defined in the same configtx.yaml"],"exampleFix":"# before (configtx.yaml profile missing orderer)\nProfiles:\n  MyChannel:\n    Application:\n      Organizations: [Org1]\n# after\nProfiles:\n  MyChannel:\n    Orderer:\n      OrdererType: etcdraft\n      Organizations: [OrdererOrg]\n    Application:\n      Organizations: [Org1]","handlingStrategy":"validation","validationCode":"bundle, ok := channelconfig.NewBundleFromConfigEnv(...) // or from fetched config\nif _, ok := bundle.OrdererConfig(); !ok {\n    return fmt.Errorf(\"channel %s config is missing OrdererConfig; regenerate genesis from a profile with an Orderer section\", bundle.ConfigtxValidator().ChannelID())\n}","typeGuard":"func hasOrdererConfig(b *channelconfig.Bundle) bool {\n    _, ok := b.OrdererConfig()\n    return ok\n}","tryCatchPattern":"if err := peer.CreateChannel(cid, block, cert); err != nil {\n    if strings.Contains(err.Error(), \"missing OrdererConfig\") {\n        // rebuild channel config with Orderer section and retry\n    }\n    return err\n}","preventionTips":["Always generate channel genesis from a configtx profile that includes an Orderer section","Validate generated blocks with configtxlator before submitting createChannel","Pin and test your configtx.yaml in CI so profiles can't lose the Orderer group","After Fabric upgrades, re-validate channel creation profiles against new requirements"],"tags":["hyperledger-fabric","channel-config","orderer","genesis-block"],"backgroundTag":"missing-orderer-config","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"}