{"record":{"id":"f4c4873216bca1f7","repo":"hyperledger/fabric","slug":"no-msp-found-for-msp-with-id-of-s","errorCode":null,"errorMessage":"no MSP found for MSP with ID of %s","messagePattern":"no MSP found for MSP with ID of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/common/cluster/util.go","lineNumber":344,"sourceCode":"\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed extracting bundle from envelope\")\n\t}\n\tmsps, err := bundle.MSPManager().GetMSPs()\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed obtaining MSPs from MSPManager\")\n\t}\n\tordererConfig, ok := bundle.OrdererConfig()\n\tif !ok {\n\t\treturn nil, errors.New(\"failed obtaining orderer config from bundle\")\n\t}\n\n\tmspIDsToCACerts := make(map[string][][]byte)\n\tvar aggregatedTLSCerts [][]byte\n\tfor _, org := range ordererConfig.Organizations() {\n\t\t// Validate that every orderer org has a corresponding MSP instance in the MSP Manager.\n\t\tmsp, exists := msps[org.MSPID()]\n\t\tif !exists {\n\t\t\treturn nil, errors.Errorf(\"no MSP found for MSP with ID of %s\", org.MSPID())\n\t\t}\n\n\t\t// Build a per org mapping of the TLS CA certs for this org,\n\t\t// and aggregate all TLS CA certs into aggregatedTLSCerts to be used later on.\n\t\tvar caCerts [][]byte\n\t\tcaCerts = append(caCerts, msp.GetTLSIntermediateCerts()...)\n\t\tcaCerts = append(caCerts, msp.GetTLSRootCerts()...)\n\t\tmspIDsToCACerts[org.MSPID()] = caCerts\n\t\taggregatedTLSCerts = append(aggregatedTLSCerts, caCerts...)\n\t}\n\n\tendpointsPerOrg := perOrgEndpoints(ordererConfig, mspIDsToCACerts)\n\tif len(endpointsPerOrg) > 0 {\n\t\treturn endpointsPerOrg, nil\n\t}\n\n\treturn globalEndpointsFromConfig(aggregatedTLSCerts, bundle), nil\n}","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/common/cluster/util.go#L326-L362","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (configtx.yaml)\n// Orderer: Organizations: [ - OrdererOrg ]  # Channel missing OrdererOrg\n// after\n// Channel: Organizations: [ - OrdererOrg ]\n// Orderer: Organizations: [ - OrdererOrg ]","handlingStrategy":"validation","validationCode":"// Pre-check: every Orderer org MSPID exists in channel MSPs\nbundle, err := channelconfig.NewBundleFromEnvelope(env, bccsp)\nif err != nil { return err }\nmsps, _ := bundle.MSPManager().GetMSPs()\nfor _, org := range bundle.OrdererConfig().Organizations() {\n    if _, ok := msps[org.MSPID()]; !ok {\n        return fmt.Errorf(\"org MSP %s missing from channel MSPs\", org.MSPID())\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["fabric","msp","config-mismatch"],"backgroundTag":"msp-id-mismatch","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"}