hyperledger/fabric · error
no orderer config in bundle
Error message
no orderer config in bundle
What it means
After extracting the config envelope from the join block and building a channelconfig bundle, IsChannelMember needs the Orderer config group to read the ConsenterMapping. If the bundle has no Orderer group, this error is returned — the block is not a valid application channel config containing an orderer section.
Source
Thrown at orderer/consensus/smartbft/consenter.go:262
return chain, nil
}
func (c *Consenter) IsChannelMember(joinBlock *cb.Block) (bool, error) {
if joinBlock == nil {
return false, errors.New("nil block")
}
envelopeConfig, err := protoutil.ExtractEnvelope(joinBlock, 0)
if err != nil {
return false, err
}
bundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, c.BCCSP)
if err != nil {
return false, err
}
oc, exists := bundle.OrdererConfig()
if !exists {
return false, errors.New("no orderer config in bundle")
}
member := false
santizedCert, err := crypto.SanitizeX509Cert(c.Identity)
if err != nil {
return false, err
}
// Extract public key using the same approach as IsConsenterOfChannel
bl, _ := pem.Decode(santizedCert)
if bl == nil {
return false, errors.Errorf("node identity certificate %s is not a valid PEM", string(santizedCert))
}
myPublicKey, err := cluster.ExtractPublicKeyFromCert(bl.Bytes)
if err != nil {
c.Logger.Warningf("Failed to extract public key from own certificate: %v", err)
return false, errView on GitHub (pinned to 2736b63f8f)
Solutions
- Use a proper channel config (genesis or latest config) block from the target channel: fetch the newest block with `peer channel fetch config` and join with that
- Regenerate the genesis block with configtxgen using a profile that includes the Orderer: section
- Verify block contents with `configtxlator proto_decode` to confirm the Orderer group is present
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the block is a channel config with an Orderer group before use
env, err := protoutil.ExtractEnvelope(block, 0)
if err != nil { return err }
bundle, err := channelconfig.NewBundleFromEnvelope(env, bccsp)
if err != nil { return err }
if _, ok := bundle.OrdererConfig(); !ok {
return errors.New("block has no Orderer config; use a proper channel config block")
} Prevention
- Join with a genesis or latest config block, never a regular data block
- Decode the block with configtxlator to verify it contains an Orderer group
- Ensure configtx profiles define an Orderer section for every channel
When it happens
Trigger: The supplied join block's first envelope yields a config bundle lacking an Orderer config group — e.g. joining with a non-config block, an application-channel-less config, or a corrupted/foreign block.
Common situations: Passing the wrong block (a data block or another channel's block) to osnadmin channel join; a genesis block generated from a profile missing the Orderer section; hand-edited config blocks stripped of the Orderer group.
Related errors
- subpolicy number %d type %T of policy %s is not convertible
- application config does not exist for channel '%s'
- could not get channelconfig for channel %s
- could not get application config for channel %s
- policy '%s' must be defined for channel '%s' before chaincod
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/6883a8a6116ba5f4.
Report an issue: GitHub.