{"record":{"id":"7f7d219fe8005c31","repo":"hyperledger/fabric","slug":"no-msp-found-for-msp-with-id-of-s-7f7d21","errorCode":null,"errorMessage":"no MSP found for MSP with ID of %s","messagePattern":"no MSP found for MSP with ID of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/util.go","lineNumber":343,"sourceCode":"\t\t\treturn nil, errors.WithStack(err)\n\t\t}\n\t\tclientCertAsDER, err := pemToDER(consenter.ClientTlsCert, uint64(consenter.Id), \"client\", logger)\n\t\tif err != nil {\n\t\t\treturn nil, errors.WithStack(err)\n\t\t}\n\n\t\t// Validate certificate structure\n\t\tfor _, cert := range [][]byte{serverCertAsDER, clientCertAsDER} {\n\t\t\tif _, err := x509.ParseCertificate(cert); err != nil {\n\t\t\t\tpemBytes := pem.EncodeToMemory(&pem.Block{Type: \"CERTIFICATE\", Bytes: cert})\n\t\t\t\tlogger.Errorf(\"Invalid certificate: %s\", string(pemBytes))\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tnodeMSP, exists := channelMSPs[consenter.MspId]\n\t\tif !exists {\n\t\t\treturn nil, errors.Errorf(\"no MSP found for MSP with ID of %s\", consenter.MspId)\n\t\t}\n\n\t\tvar rootCAs [][]byte\n\t\trootCAs = append(rootCAs, nodeMSP.GetTLSRootCerts()...)\n\t\trootCAs = append(rootCAs, nodeMSP.GetTLSIntermediateCerts()...)\n\n\t\tsanitizedCert, err := crypto.SanitizeX509Cert(consenter.Identity)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tremoteNodes = append(remoteNodes, cluster.RemoteNode{\n\t\t\tNodeAddress: cluster.NodeAddress{\n\t\t\t\tID:       uint64(consenter.Id),\n\t\t\t\tEndpoint: fmt.Sprintf(\"%s:%d\", consenter.Host, consenter.Port),\n\t\t\t},\n\n\t\t\tNodeCerts: cluster.NodeCerts{","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/util.go#L325-L361","documentation":"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.","triggerScenarios":"configBlockCommitted -> remoteNodesFromConfigBlock iterating bundle.OrdererConfig().Consenters where consenter.MspId has no entry in channelMSPs (MSPManager().GetMSPs()).","commonSituations":"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.","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"],"exampleFix":"// before: consenter references MSP not in channel config\nConsenters:\n  - Host: orderer3.example.com\n    MspId: OrdererOrg3   # Organization OrdererOrg3 not in channel Organizations\n\n// after: add the org (and its MSP) to the channel config first\nOrganizations:\n  - &OrdererOrg3\n    Name: OrdererOrg3\n    MSPID: OrdererOrg3\n    MSPDir: ./crypto-config/ordererOrganizations/org3.example.com/msp","handlingStrategy":"validation","validationCode":"channelMSPs, err := bundle.MSPManager().GetMSPs()\nif err != nil {\n    return err\n}\noc, ok := bundle.OrdererConfig()\nif !ok {\n    return errors.New(\"no orderer config\")\n}\nfor _, consenter := range oc.Consenters {\n    if _, exists := channelMSPs[consenter.MspId]; !exists {\n        return fmt.Errorf(\"pre-flight: consenter MSP %q missing from channel Organizations; add the org via config update\", consenter.MspId)\n    }\n}","typeGuard":"func allConsenterMSPsPresent(oc *ordererconfig.Orderer, channelMSPs map[string]msp.MSP) []string {\n    var missing []string\n    if oc == nil {\n        return []string{\"nil orderer config\"}\n    }\n    for _, c := range oc.Consenters {\n        if _, ok := channelMSPs[c.MspId]; !ok {\n            missing = append(missing, c.MspId)\n        }\n    }\n    return missing\n}","tryCatchPattern":"nodeMSP, exists := channelMSPs[consenter.MspId]\nif !exists {\n    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)\n}","preventionTips":["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"],"tags":["hyperledger-fabric","msp","consenter","smartbft"],"backgroundTag":"msp-not-found","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"}