{"record":{"id":"d5bbb530677b40df","repo":"hyperledger/fabric","slug":"grpc-server-exited-with-error-s","errorCode":null,"errorMessage":"grpc server exited with error: %s","messagePattern":"grpc server exited with error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/node/start.go","lineNumber":929,"sourceCode":"\t\t\t\taclProvider,\n\t\t\t\tcoreConfig.LocalMSPID,\n\t\t\t\tcoreConfig.GatewayOptions,\n\t\t\t\tbuiltinSCCs,\n\t\t\t)\n\t\t\tgatewayprotos.RegisterGatewayServer(peerServer.Server(), gatewayServer)\n\t\t} else {\n\t\t\tlogger.Warning(\"Discovery service must be enabled for embedded gateway\")\n\t\t}\n\t}\n\n\t// register the snapshot server\n\tsnapshotSvc := &snapshotgrpc.SnapshotService{LedgerGetter: peerInstance, ACLProvider: aclProvider}\n\tpb.RegisterSnapshotServer(peerServer.Server(), snapshotSvc)\n\n\tgo func() {\n\t\tvar grpcErr error\n\t\tif grpcErr = peerServer.Start(); grpcErr != nil {\n\t\t\tgrpcErr = fmt.Errorf(\"grpc server exited with error: %s\", grpcErr)\n\t\t}\n\t\tserve <- grpcErr\n\t}()\n\n\t// Block until grpc server exits\n\treturn <-serve\n}\n\nfunc handleSignals(handlers map[os.Signal]func()) {\n\tvar signals []os.Signal\n\tfor sig := range handlers {\n\t\tsignals = append(signals, sig)\n\t}\n\n\tsignalChan := make(chan os.Signal, 1)\n\tsignal.Notify(signalChan, signals...)\n\n\tgo func() {","sourceCodeStart":911,"sourceCodeEnd":947,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/node/start.go#L911-L947","documentation":"Logged when the peer's main gRPC server goroutine exits: peerServer.Start() returned a non-nil error (e.g., listener failure or accept-loop error), which is wrapped and pushed to the serve channel to shut the peer down.","triggerScenarios":"Thrown at internal/peer/node/start.go:929 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the listen address/port is already in use or lacks permissions","Inspect the logged underlying error for TLS or socket issues","Restart the peer after freeing the port/fixing TLS config"],"exampleFix":null,"handlingStrategy":"fallback","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"}