{"record":{"id":"9ea04e5ccea2b4be","repo":"jaegertracing/jaeger","slug":"failed-to-create-grpc-server-w","errorCode":null,"errorMessage":"failed to create gRPC server: %w","messagePattern":"failed to create gRPC server: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/remote-storage/app/server.go","lineNumber":111,"sourceCode":"\tif tm.Enabled {\n\t\tunaryInterceptors = append(unaryInterceptors, tenancy.NewGuardingUnaryInterceptor(tm))\n\t\tstreamInterceptors = append(streamInterceptors, tenancy.NewGuardingStreamInterceptor(tm))\n\t}\n\n\tcfg.NetAddr.Transport = confignet.TransportTypeTCP\n\tvar extensions map[component.ID]component.Component\n\tif telset.Host != nil {\n\t\textensions = telset.Host.GetExtensions()\n\t}\n\tserver, err := cfg.ToServer(\n\t\tctx,\n\t\textensions,\n\t\ttelset.ToOtelComponent(),\n\t\tconfiggrpc.WithGrpcServerOption(grpc.ChainUnaryInterceptor(unaryInterceptors...)),\n\t\tconfiggrpc.WithGrpcServerOption(grpc.ChainStreamInterceptor(streamInterceptors...)),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create gRPC server: %w\", err)\n\t}\n\thealthServer := health.NewServer()\n\treflection.Register(server)\n\n\tv2Handler.Register(server, healthServer)\n\tgrpc_health_v1.RegisterHealthServer(server, healthServer)\n\n\treturn server, nil\n}\n\n// Start gRPC server concurrently\nfunc (s *Server) Start(ctx context.Context) error {\n\tvar err error\n\ts.grpcConn, err = s.grpcCfg.NetAddr.Listen(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to listen on gRPC port: %w\", err)\n\t}\n\ts.telset.Logger.Info(\"Starting GRPC server\", zap.Stringer(\"addr\", s.grpcConn.Addr()))","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/remote-storage/app/server.go#L93-L129","documentation":"This error is wrapped by createGRPCServer (cmd/remote-storage/app/server.go:111) when the configgrpc.ServerConfig.ToServer(...) call fails to construct the underlying grpc.Server for Jaeger remote-storage. The config (listener address, TLS/transport credentials, interceptors) is converted into an OTel-collector-style gRPC server here, and any misconfiguration is reported with this wrapper. It occurs during Server construction (NewServer), so the process fails to start.","triggerScenarios":"Calling NewServer (which invokes createGRPCServer) with a configgrpc.ServerConfig whose ToServer fails, e.g. TLS enabled (TLSSetting with CertFile/KeyFile) where the cert/key files do not exist, are unreadable, or are malformed; or an invalid combination of server options in the config.","commonSituations":"Mounting TLS secrets into a Kubernetes pod but with wrong paths in the remote-storage config; cert/key files present but expired or not valid PEM; supplying only a CA file without the server key pair; copy-pasting a client-side config into the server config.","solutions":["Verify that TLS cert/key file paths in the remote-storage gRPC server config point to existing, readable, valid PEM files, or remove the TLSSetting block to run without TLS","Enable debug logging to see the underlying wrapped error from cfg.ToServer and address that specific cause","If no TLS/auth is intended, ensure ServerConfig has NetAddr set and no partial transport-credential settings","Validate the config with the otel config validation helpers used by the project before launching"],"exampleFix":"// before (config: TLS enabled but files missing)\n// grpc:\n//   tls:\n//     cert_file: /etc/certs/server.crt\n//     key_file: /etc/certs/server.key   <- file missing\n// after\n// grpc:\n//   tls:\n//     cert_file: /etc/certs/server.crt\n//     key_file: /etc/certs/server.key   # both files exist and are valid PEM\n//     # verify: openssl x509 -in /etc/certs/server.crt -noout","handlingStrategy":"validation","validationCode":"// before constructing the server, validate config and TLS material\nfunc validateGRPCServerCfg(cfg configgrpc.ServerConfig) error {\n\tif cfg.NetAddr.Endpoint == \"\" {\n\t\treturn errors.New(\"grpc endpoint not set\")\n\t}\n\treturn cfg.Validate() // otel config validation; errors if TLS files are missing/invalid\n}","typeGuard":null,"tryCatchPattern":"server, err := createGRPCServer(ctx, cfg, tm, handler, telset)\nif err != nil {\n\tlog.Fatalf(\"invalid gRPC server config: %v\", err) // err wraps the cfg.ToServer cause\n}","preventionTips":["Pre-validate TLS cert/key files exist and parse with openssl x509 before deploying","Use otelcol config validation patterns to check ServerConfig at startup","Keep server TLS settings in one config source; avoid hand-merged partial configs","Test startup in CI with the same mount paths used in production"],"tags":["grpc","configuration","tls","startup"],"backgroundTag":"grpc-server-config-invalid","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}