{"record":{"id":"91a3fe4f71377ad8","repo":"hyperledger/fabric","slug":"failed-cast-clusterconsenter-is-not-a-consensus-c","errorCode":null,"errorMessage":"failed cast: clusterConsenter is not a consensus.ClusterConsenter","messagePattern":"failed cast: clusterConsenter is not a consensus\\.ClusterConsenter","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/common/multichannel/registrar.go","lineNumber":299,"sourceCode":"\tconfigEnv, err := protoutil.ExtractEnvelope(configBlock, 0)\n\tif err != nil {\n\t\treturn nil, nil, errors.WithMessagef(err, \"failed extracting config envelope from block\")\n\t}\n\n\tledgerRes, err := r.newLedgerResources(configEnv)\n\tif err != nil {\n\t\treturn nil, nil, errors.WithMessagef(err, \"failed creating ledger resources\")\n\t}\n\n\tordererConfig, _ := ledgerRes.OrdererConfig()\n\tconsenter, foundConsenter := r.consenters[ordererConfig.ConsensusType()]\n\tif !foundConsenter {\n\t\treturn nil, nil, errors.Errorf(\"failed to find a consenter for consensus type: %s\", ordererConfig.ConsensusType())\n\t}\n\n\tclusterConsenter, ok := consenter.(consensus.ClusterConsenter)\n\tif !ok {\n\t\treturn nil, nil, errors.New(\"failed cast: clusterConsenter is not a consensus.ClusterConsenter\")\n\t}\n\n\treturn ledgerRes, clusterConsenter, nil\n}\n\n// BroadcastChannelSupport returns the message channel header, whether the message is a config update\n// and the channel resources for a message or an error if the message is not a message which can\n// be processed directly (like CONFIG and ORDERER_TRANSACTION messages)\nfunc (r *Registrar) BroadcastChannelSupport(msg *cb.Envelope) (*cb.ChannelHeader, bool, *ChainSupport, error) {\n\tchdr, err := protoutil.ChannelHeader(msg)\n\tif err != nil {\n\t\treturn nil, false, nil, errors.WithMessage(err, \"could not determine channel ID\")\n\t}\n\n\tcs := r.GetChain(chdr.ChannelId)\n\t// Used to be new channel creation with the system channel, but now channels are created with the channel\n\t// participation API only, so it is just a wrong channel name.\n\tif cs == nil {","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/common/multichannel/registrar.go#L281-L317","documentation":"initLedgerResourcesClusterConsenter guard: the consenter found for the channel's consensus type could not be type-asserted to consensus.ClusterConsenter. The registered plugin does not implement the cluster-consenter interface required for cluster (Raft/BFT) channels — a plugin registration or version-mismatch problem.","triggerScenarios":"Thrown at orderer/common/multichannel/registrar.go:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the consensus plugin registered implements consensus.ClusterConsenter","Check for mixed Fabric versions across orderer binaries"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}