{"record":{"id":"9d3a6f8cf3133e0c","repo":"hyperledger/fabric","slug":"no-orderer-config-in-bundle-9d3a6f","errorCode":null,"errorMessage":"no orderer config in bundle","messagePattern":"no orderer config in bundle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/etcdraft/util.go","lineNumber":375,"sourceCode":"\n// IsConsenterOfChannel returns whether the caller is a consenter of a channel\n// by inspecting the given configuration block.\n// It returns nil if true, else returns an error.\nfunc (conCert ConsenterCertificate) IsConsenterOfChannel(configBlock *common.Block) error {\n\tif configBlock == nil || configBlock.GetHeader() == nil {\n\t\treturn errors.New(\"nil block or nil header\")\n\t}\n\tenvelopeConfig, err := protoutil.ExtractEnvelope(configBlock, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, conCert.CryptoProvider)\n\tif err != nil {\n\t\treturn err\n\t}\n\toc, exists := bundle.OrdererConfig()\n\tif !exists {\n\t\treturn errors.New(\"no orderer config in bundle\")\n\t}\n\tm := &etcdraft.ConfigMetadata{}\n\tif err := proto.Unmarshal(oc.ConsensusMetadata(), m); err != nil {\n\t\treturn err\n\t}\n\n\tbl, _ := pem.Decode(conCert.ConsenterCertificate)\n\tif bl == nil {\n\t\treturn errors.Errorf(\"my consenter certificate %s is not a valid PEM\", string(conCert.ConsenterCertificate))\n\t}\n\n\tmyCertDER := bl.Bytes\n\n\tvar failedMatches []string\n\tfor _, consenter := range m.GetConsenters() {\n\t\tcandidateBlock, _ := pem.Decode(consenter.GetServerTlsCert())\n\t\tif candidateBlock == nil {\n\t\t\treturn errors.Errorf(\"candidate server certificate %s is not a valid PEM\", string(consenter.GetServerTlsCert()))","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/etcdraft/util.go#L357-L393","documentation":"IsConsenterOfChannel builds a channelconfig.Bundle from the config envelope and then reads the orderer configuration section. If the bundle has no OrdererConfig (bundle.OrdererConfig() returns exists=false), the block is not a valid channel config for an ordering system channel, so the check cannot proceed and this error is returned.","triggerScenarios":"Calling IsConsenterOfChannel with a config block whose embedded config envelope lacks the orderer group — e.g. an application channel block or a malformed config passed as the config block.","commonSituations":"Passing a regular application-channel block where a config block of the ordering system channel is expected; channel config created without an Orderer section in configtx.yaml; corrupted or hand-edited config block envelope.","solutions":["Pass the correct config block — the ordering system channel's config block, not an application channel block","Regenerate genesis/config with an Orderer section defined in configtx.yaml (Orderer: OrdererType, Organizations, etc.)","Verify the block is actually a CONFIG block (type HeaderType_CONFIG) with a valid orderer config group"],"exampleFix":"// before\nerr := conCert.IsConsenterOfChannel(appChannelBlock) // app channel, no orderer config\n// after\nconfigBlock, err := cluster.RetrieveSystemChannelConfigBlock(ledger)\nif err != nil { return err }\nerr = conCert.IsConsenterOfChannel(configBlock)","handlingStrategy":"validation","validationCode":"envelopeConfig, err := protoutil.ExtractEnvelope(configBlock, 0)\nif err != nil { return err }\nbundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, cryptoProvider)\nif err != nil { return err }\nif bundle.OrdererConfig() == nil {\n    return errors.New(\"block has no orderer config; expected system channel config block\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify the block type is HeaderType_CONFIG and from the ordering system channel","Ensure configtx.yaml defines an Orderer section before generating genesis","Validate config blocks with channelconfig.NewBundleFromEnvelope in CI before deployment"],"tags":["hyperledger-fabric","etcdraft","channel-config","orderer"],"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"}