hyperledger/fabric · error
core/comm: server handshakes are not implemented with client
Error message
core/comm: server handshakes are not implemented with clientCreds
What it means
Sentinel error returned by DynamicClientCredentials.ServerHandshake: these are client-side credentials and do not implement the server handshake path. Exported as ErrServerHandshakeNotImplemented; encountering it indicates wrong credentials type passed to a server.
Source
Thrown at internal/pkg/comm/creds.go:24
package comm
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"net"
"sync"
"time"
"github.com/hyperledger/fabric-lib-go/common/flogging"
"google.golang.org/grpc/credentials"
)
var (
ErrClientHandshakeNotImplemented = errors.New("core/comm: client handshakes are not implemented with serverCreds")
ErrServerHandshakeNotImplemented = errors.New("core/comm: server handshakes are not implemented with clientCreds")
ErrOverrideHostnameNotSupported = errors.New("core/comm: OverrideServerName is not supported")
// alpnProtoStr are the specified application level protocols for gRPC.
alpnProtoStr = []string{"h2"}
// Logger for TLS client connections
tlsClientLogger = flogging.MustGetLogger("comm.tls")
)
// NewServerTransportCredentials returns a new initialized
// grpc/credentials.TransportCredentials
func NewServerTransportCredentials(
serverConfig *TLSConfig,
logger *flogging.FabricLogger,
) credentials.TransportCredentials {
// NOTE: unlike the default grpc/credentials implementation, we do not
// clone the tls.Config which allows us to update it dynamically
serverConfig.config.NextProtos = alpnProtoStrView on GitHub (pinned to 2736b63f8f)
Solutions
- Pass server transport credentials to grpc server options
- Use DynamicClientCredentials only on the client side
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at internal/pkg/comm/creds.go:24 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/4fe3979442be35d0.
Report an issue: GitHub.