hyperledger/fabric · error

failed obtaining client certificates

Error message

failed obtaining client certificates

What it means

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.

Source

Thrown at internal/peer/node/start.go:1228

// 3. Init the security advisor;
// 4. Init gossip related struct.
func initGossipService(
	policyMgr policies.ChannelPolicyManagerGetter,
	metricsProvider metrics.Provider,
	peerServer *comm.GRPCServer,
	signer msp.SigningIdentity,
	credSupport *comm.CredentialSupport,
	peerAddress string,
	deliverServiceConfig *deliverservice.DeliverServiceConfig,
	privdataConfig *gossipprivdata.PrivdataConfig,
	peerInstance *peer.Peer,
) (*gossipservice.GossipService, error) {
	var certs *gossipcommon.TLSCertificates
	if peerServer.TLSEnabled() {
		serverCert := peerServer.ServerCertificate()
		clientCert, err := peer.GetClientCertificate()
		if err != nil {
			return nil, errors.Wrap(err, "failed obtaining client certificates")
		}
		certs = &gossipcommon.TLSCertificates{}
		certs.TLSServerCert.Store(&serverCert)
		certs.TLSClientCert.Store(&clientCert)
	}

	localMSP := mgmt.GetLocalMSP(factory.GetDefault())
	deserManager := peergossip.NewDeserializersManager(localMSP)
	messageCryptoService := peergossip.NewMCS(
		policyMgr,
		signer,
		deserManager,
		factory.GetDefault(),
		peerInstance.GetChannelConfig,
	)
	secAdv := peergossip.NewSecurityAdvisor(deserManager)
	bootstrap := viper.GetStringSlice("peer.gossip.bootstrap")

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Verify peer.tls.certFile, keyFile and any client TLS material exist and are valid PEM
  2. Check file permissions for the peer process user
  3. Ensure cert and key match (same key pair)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/peer/node/start.go:1228 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/a31c14419d0cae48. Report an issue: GitHub.