hyperledger/fabric · error
no MSP found for MSP with ID of %s
Error message
no MSP found for MSP with ID of %s
What it means
The loop validates that every orderer organization in the config has a corresponding MSP instance in the bundle's MSP manager. When an orderer org's MSPID is not a key in msps (returned by GetMSPs), the block's orderer section and channel MSPs are inconsistent, so endpoint/TLS CA extraction aborts.
Source
Thrown at orderer/common/cluster/util.go:344
if err != nil {
return nil, errors.Wrap(err, "failed extracting bundle from envelope")
}
msps, err := bundle.MSPManager().GetMSPs()
if err != nil {
return nil, errors.Wrap(err, "failed obtaining MSPs from MSPManager")
}
ordererConfig, ok := bundle.OrdererConfig()
if !ok {
return nil, errors.New("failed obtaining orderer config from bundle")
}
mspIDsToCACerts := make(map[string][][]byte)
var aggregatedTLSCerts [][]byte
for _, org := range ordererConfig.Organizations() {
// Validate that every orderer org has a corresponding MSP instance in the MSP Manager.
msp, exists := msps[org.MSPID()]
if !exists {
return nil, errors.Errorf("no MSP found for MSP with ID of %s", org.MSPID())
}
// Build a per org mapping of the TLS CA certs for this org,
// and aggregate all TLS CA certs into aggregatedTLSCerts to be used later on.
var caCerts [][]byte
caCerts = append(caCerts, msp.GetTLSIntermediateCerts()...)
caCerts = append(caCerts, msp.GetTLSRootCerts()...)
mspIDsToCACerts[org.MSPID()] = caCerts
aggregatedTLSCerts = append(aggregatedTLSCerts, caCerts...)
}
endpointsPerOrg := perOrgEndpoints(ordererConfig, mspIDsToCACerts)
if len(endpointsPerOrg) > 0 {
return endpointsPerOrg, nil
}
return globalEndpointsFromConfig(aggregatedTLSCerts, bundle), nil
}View on GitHub (pinned to 2736b63f8f)
Solutions
- Compare org.MSPID() values in the Orderer section against the channel MSP list using configtxlator decode.
- Update configtx.yaml so every org in Orderer.Organizations also appears in the channel's Organizations with the identical MSP ID.
- Regenerate and submit a config update that adds the missing MSP to the channel config.
- Rebuild the genesis block / channel creation transaction from the corrected profile.
Example fix
// before (configtx.yaml) // Orderer: Organizations: [ - OrdererOrg ] # Channel missing OrdererOrg // after // Channel: Organizations: [ - OrdererOrg ] // Orderer: Organizations: [ - OrdererOrg ]
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check: every Orderer org MSPID exists in channel MSPs
bundle, err := channelconfig.NewBundleFromEnvelope(env, bccsp)
if err != nil { return err }
msps, _ := bundle.MSPManager().GetMSPs()
for _, org := range bundle.OrdererConfig().Organizations() {
if _, ok := msps[org.MSPID()]; !ok {
return fmt.Errorf("org MSP %s missing from channel MSPs", org.MSPID())
}
} Prevention
- Keep Orderer.Organizations and Channel.Organizations in sync in configtx.yaml.
- When renaming an MSP ID, update every reference in one config update.
- Diff config updates with configtxlator before approval.
When it happens
Trigger: A config block where an organization under Orderer: -> Organizations declares an MSP ID that does not appear in the channel's MSPs (Channels: -> Organizations or Consortiums), typically after renaming an MSP ID in one place but not the other.
Common situations: configtx.yaml where Orderer.Organizations lists an org not included in the channel's Organizations, MSP ID renamed during a config update in only one section, or mixing config blocks from different networks.
Related errors
- error converting policy with reference '%s' on channel '%s'
- collection-name: %s -- collection member '%s' is not part of
- collection-name: %s -- contains an identity that is not part
- could not serialize the signing identity
- failed fetching signing identity: %v
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/f4c4873216bca1f7.
Report an issue: GitHub.