{"record":{"id":"2ef913a7b9b1e0e2","repo":"hyperledger/fabric","slug":"missing-ordererconfig-in-channel-config","errorCode":null,"errorMessage":"missing OrdererConfig in channel config","messagePattern":"missing OrdererConfig in channel config","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/common/common.go","lineNumber":282,"sourceCode":"\n\tif proposalResp.Response.Status != 0 && proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"error bad proposal response %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\t// parse config\n\tchannelConfig := &pcommon.Config{}\n\tif err := proto.Unmarshal(proposalResp.Response.Payload, channelConfig); err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error unmarshalling channel config\")\n\t}\n\n\tbundle, err := channelconfig.NewBundle(chainID, channelConfig, cryptoProvider)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error loading channel config\")\n\t}\n\n\tordererConfig, ok := bundle.OrdererConfig()\n\tif !ok {\n\t\treturn nil, errors.New(\"missing OrdererConfig in channel config\")\n\t}\n\n\tvar orgAddresses []string\n\tfor orgName, org := range ordererConfig.Organizations() {\n\t\tlogger.Debugf(\"Adding endpoints of org `%s`: %v\", orgName, org.Endpoints())\n\t\torgAddresses = append(orgAddresses, org.Endpoints()...)\n\t}\n\n\tordererAddresses := bundle.ChannelConfig().OrdererAddresses()\n\tif len(orgAddresses) > 0 {\n\t\tif len(ordererAddresses) > 0 {\n\t\t\tlogger.Warningf(\"Deprecated global OrdererAddresses exist: %s; ignoring them\", ordererAddresses)\n\t\t}\n\t\treturn orgAddresses, nil\n\t}\n\n\tlogger.Warningf(\"Org specific endpoints are missing, returning (deprecated) global OrdererAddresses: %s; \", ordererAddresses)\n\treturn ordererAddresses, nil","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/common/common.go#L264-L300","documentation":"The channel config returned by the endorser was parsed successfully, but it contains no Orderer configuration group. GetOrdererEndpointOfChain exists to collect orderer endpoints, so a config without an Orderer group is unusable.","triggerScenarios":"The fetched channel config (from the peer) lacks the Orderer config group — e.g. the peer returned config of a channel with no orderer section, or the wrong channel's config was fetched.","commonSituations":"Misconfigured channel where the orderer group was omitted at creation, querying a system/test channel without orderer config, or fetching config from a peer with stale/partial channel configuration.","solutions":["Verify the channel's configtx defines the Orderer group and re-create/update the channel config if missing","Confirm you are querying the correct channel name","Fetch the channel config directly from an orderer and compare the Orderer group contents","Inspect peer logs to confirm which channel config was loaded"],"exampleFix":"// before\nbundle, err := configtx.NewChannelConfig(channelConfig)\nordererConfig, ok := bundle.OrdererConfig() // may be missing\n// after\nbundle, err := configtx.NewChannelConfig(channelConfig)\nif err != nil { return nil, err }\nif _, ok := bundle.OrdererConfig(); !ok { log.Fatal(\"channel config lacks Orderer group; fix configtx\") }","handlingStrategy":"validation","validationCode":"// validate channel config contains an Orderer group before use\n// fetch config via 'peer channel fetch config' and check the Orderer group exists\n// or: bundle, _ := configtx.NewChannelConfig(cfg); _, ok := bundle.OrdererConfig()","typeGuard":"ordererConfig, ok := bundle.OrdererConfig()\nif !ok {\n    return errors.New(\"channel config has no Orderer group\")\n}","tryCatchPattern":"orderers, err := GetOrdererEndpointOfChain(chainID, dc, signer, cp)\nif err != nil && strings.Contains(err.Error(), \"missing OrdererConfig\") {\n    return errors.New(\"channel is misconfigured: regenerate configtx with Orderer group\")\n}","preventionTips":["Ensure channel creation configtx includes the Orderer section","Verify channel name matches the intended channel","Compare config fetched from orderer vs peer when debugging"],"tags":["fabric","channel-config","orderer","configtx"],"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"}