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
While building cluster node metadata, each consenter's MspId is looked up in the channel's MSP map obtained from the MSP manager. This error means a consenter listed in the Orderer config references an MSP ID that is not defined in the channel's MSPs. The SmartBFT chain cannot resolve that consenter's TLS root certificates and refuses to proceed.
Source
Thrown at orderer/consensus/smartbft/util.go:343
return nil, errors.WithStack(err)
}
clientCertAsDER, err := pemToDER(consenter.ClientTlsCert, uint64(consenter.Id), "client", logger)
if err != nil {
return nil, errors.WithStack(err)
}
// Validate certificate structure
for _, cert := range [][]byte{serverCertAsDER, clientCertAsDER} {
if _, err := x509.ParseCertificate(cert); err != nil {
pemBytes := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: cert})
logger.Errorf("Invalid certificate: %s", string(pemBytes))
return nil, err
}
}
nodeMSP, exists := channelMSPs[consenter.MspId]
if !exists {
return nil, errors.Errorf("no MSP found for MSP with ID of %s", consenter.MspId)
}
var rootCAs [][]byte
rootCAs = append(rootCAs, nodeMSP.GetTLSRootCerts()...)
rootCAs = append(rootCAs, nodeMSP.GetTLSIntermediateCerts()...)
sanitizedCert, err := crypto.SanitizeX509Cert(consenter.Identity)
if err != nil {
return nil, err
}
remoteNodes = append(remoteNodes, cluster.RemoteNode{
NodeAddress: cluster.NodeAddress{
ID: uint64(consenter.Id),
Endpoint: fmt.Sprintf("%s:%d", consenter.Host, consenter.Port),
},
NodeCerts: cluster.NodeCerts{View on GitHub (pinned to 2736b63f8f)
Solutions
- Compare the consenter's MspId against the channel's Organizations/MSPs; fix the MSP ID spelling/casing in the consenter definition
- Add the missing organization (with its MSP) to the channel config via a config update transaction (configtxlator -> compute update -> sign -> submit)
- Regenerate the channel config so every consenter's organization appears under Organizations with correct MSPID
- If the consenter shouldn't exist, remove it from the Orderer.Consenters list
Example fix
// before: consenter references MSP not in channel config
Consenters:
- Host: orderer3.example.com
MspId: OrdererOrg3 # Organization OrdererOrg3 not in channel Organizations
// after: add the org (and its MSP) to the channel config first
Organizations:
- &OrdererOrg3
Name: OrdererOrg3
MSPID: OrdererOrg3
MSPDir: ./crypto-config/ordererOrganizations/org3.example.com/msp Defensive patterns
Strategy: validation
Validate before calling
channelMSPs, err := bundle.MSPManager().GetMSPs()
if err != nil {
return err
}
oc, ok := bundle.OrdererConfig()
if !ok {
return errors.New("no orderer config")
}
for _, consenter := range oc.Consenters {
if _, exists := channelMSPs[consenter.MspId]; !exists {
return fmt.Errorf("pre-flight: consenter MSP %q missing from channel Organizations; add the org via config update", consenter.MspId)
}
} Type guard
func allConsenterMSPsPresent(oc *ordererconfig.Orderer, channelMSPs map[string]msp.MSP) []string {
var missing []string
if oc == nil {
return []string{"nil orderer config"}
}
for _, c := range oc.Consenters {
if _, ok := channelMSPs[c.MspId]; !ok {
missing = append(missing, c.MspId)
}
}
return missing
} Try / catch
nodeMSP, exists := channelMSPs[consenter.MspId]
if !exists {
return fmt.Errorf("MSP %q of consenter %s:%d not in channel config; submit a config update adding its organization", consenter.MspId, consenter.Host, consenter.Port)
} Prevention
- Whenever adding a consenter, first add its organization/MSP to the channel config in the same or an earlier update
- Keep MSPIDs in configtx.yaml, cryptogen output, and Orderer.Consenters exactly consistent (watch casing)
- Run a pre-commit script that cross-checks Consenters[].MspId against Organizations[].MSPID using configtxlator
- Use the same configtx.yaml as source of truth for both orderer orgs and consenter lists
When it happens
Trigger: configBlockCommitted -> remoteNodesFromConfigBlock iterating bundle.OrdererConfig().Consenters where consenter.MspId has no entry in channelMSPs (MSPManager().GetMSPs()).
Common situations: Adding a new orderer organization to Consenters without adding its MSP to the channel config; typo or mismatched MSP ID between configtx.yaml and the consenter definition; channel config update added a consenter but the update transaction omitted the corresponding Organization; joining an orderer of an org that was never registered with the channel.
Related errors
- remote nodes cannot be computed, rejecting config block
- identity isn't an MSP Identity
- node with id of %d doesn't exist
- orderer org %s attempted to change MSP ID from %s to %s
- application org %s attempted to change MSP ID from %s to %s
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/7f7d219fe8005c31.
Report an issue: GitHub.