{"record":{"id":"a31c14419d0cae48","repo":"hyperledger/fabric","slug":"failed-obtaining-client-certificates","errorCode":null,"errorMessage":"failed obtaining client certificates","messagePattern":"failed obtaining client certificates","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/node/start.go","lineNumber":1228,"sourceCode":"// 3. Init the security advisor;\n// 4. Init gossip related struct.\nfunc initGossipService(\n\tpolicyMgr policies.ChannelPolicyManagerGetter,\n\tmetricsProvider metrics.Provider,\n\tpeerServer *comm.GRPCServer,\n\tsigner msp.SigningIdentity,\n\tcredSupport *comm.CredentialSupport,\n\tpeerAddress string,\n\tdeliverServiceConfig *deliverservice.DeliverServiceConfig,\n\tprivdataConfig *gossipprivdata.PrivdataConfig,\n\tpeerInstance *peer.Peer,\n) (*gossipservice.GossipService, error) {\n\tvar certs *gossipcommon.TLSCertificates\n\tif peerServer.TLSEnabled() {\n\t\tserverCert := peerServer.ServerCertificate()\n\t\tclientCert, err := peer.GetClientCertificate()\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed obtaining client certificates\")\n\t\t}\n\t\tcerts = &gossipcommon.TLSCertificates{}\n\t\tcerts.TLSServerCert.Store(&serverCert)\n\t\tcerts.TLSClientCert.Store(&clientCert)\n\t}\n\n\tlocalMSP := mgmt.GetLocalMSP(factory.GetDefault())\n\tdeserManager := peergossip.NewDeserializersManager(localMSP)\n\tmessageCryptoService := peergossip.NewMCS(\n\t\tpolicyMgr,\n\t\tsigner,\n\t\tdeserManager,\n\t\tfactory.GetDefault(),\n\t\tpeerInstance.GetChannelConfig,\n\t)\n\tsecAdv := peergossip.NewSecurityAdvisor(deserManager)\n\tbootstrap := viper.GetStringSlice(\"peer.gossip.bootstrap\")\n","sourceCodeStart":1210,"sourceCodeEnd":1246,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/node/start.go#L1210-L1246","documentation":"During initGossipService with TLS enabled on the peer server, assembling the gossip TLSCertificates (server certificate plus the client certificate/key pair) failed; the underlying error explains which certificate file or key could not be loaded or parsed.","triggerScenarios":"Thrown at internal/peer/node/start.go:1228 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify peer.tls.certFile, keyFile and any client TLS material exist and are valid PEM","Check file permissions for the peer process user","Ensure cert and key match (same key pair)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}