hyperledger/fabric · error
failed cast: clusterConsenter is not a consensus.ClusterCons
Error message
failed cast: clusterConsenter is not a consensus.ClusterConsenter
What it means
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.
Source
Thrown at orderer/common/multichannel/registrar.go:299
configEnv, err := protoutil.ExtractEnvelope(configBlock, 0)
if err != nil {
return nil, nil, errors.WithMessagef(err, "failed extracting config envelope from block")
}
ledgerRes, err := r.newLedgerResources(configEnv)
if err != nil {
return nil, nil, errors.WithMessagef(err, "failed creating ledger resources")
}
ordererConfig, _ := ledgerRes.OrdererConfig()
consenter, foundConsenter := r.consenters[ordererConfig.ConsensusType()]
if !foundConsenter {
return nil, nil, errors.Errorf("failed to find a consenter for consensus type: %s", ordererConfig.ConsensusType())
}
clusterConsenter, ok := consenter.(consensus.ClusterConsenter)
if !ok {
return nil, nil, errors.New("failed cast: clusterConsenter is not a consensus.ClusterConsenter")
}
return ledgerRes, clusterConsenter, nil
}
// BroadcastChannelSupport returns the message channel header, whether the message is a config update
// and the channel resources for a message or an error if the message is not a message which can
// be processed directly (like CONFIG and ORDERER_TRANSACTION messages)
func (r *Registrar) BroadcastChannelSupport(msg *cb.Envelope) (*cb.ChannelHeader, bool, *ChainSupport, error) {
chdr, err := protoutil.ChannelHeader(msg)
if err != nil {
return nil, false, nil, errors.WithMessage(err, "could not determine channel ID")
}
cs := r.GetChain(chdr.ChannelId)
// Used to be new channel creation with the system channel, but now channels are created with the channel
// participation API only, so it is just a wrong channel name.
if cs == nil {View on GitHub (pinned to 2736b63f8f)
Solutions
- Verify the consensus plugin registered implements consensus.ClusterConsenter
- Check for mixed Fabric versions across orderer binaries
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at orderer/common/multichannel/registrar.go:299 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/91a3fe4f71377ad8.
Report an issue: GitHub.