{"record":{"id":"bdc7d4e6bbf628a1","repo":"jaegertracing/jaeger","slug":"error-creating-reader-client-connection-w","errorCode":null,"errorMessage":"error creating reader client connection: %w","messagePattern":"error creating reader client connection: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v2/grpc/factory.go","lineNumber":161,"sourceCode":"\t}\n\n\tbaseOpts := []grpc.DialOption{\n\t\tgrpc.WithChainUnaryInterceptor(unaryInterceptors...),\n\t\tgrpc.WithChainStreamInterceptor(streamInterceptors...),\n\t}\n\tif f.config.MaxRecvMsgSizeMiB > 0 {\n\t\tbaseOpts = append(baseOpts, grpc.WithDefaultCallOptions(\n\t\t\tgrpc.MaxCallRecvMsgSize(f.config.MaxRecvMsgSizeMiB*1024*1024),\n\t\t))\n\t}\n\n\tcreateConn := func(telset component.TelemetrySettings, gcs *configgrpc.ClientConfig) (*grpc.ClientConn, error) {\n\t\treturn newClient(telset, gcs, baseOpts...)\n\t}\n\n\treaderConn, err := createConn(readerTelset, readerConfig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error creating reader client connection: %w\", err)\n\t}\n\twriterConn, err := createConn(writerTelset, writerConfig)\n\tif err != nil {\n\t\t_ = readerConn.Close()\n\t\treturn fmt.Errorf(\"error creating writer client connection: %w\", err)\n\t}\n\n\tf.readerConn, f.writerConn = readerConn, writerConn\n\n\treturn nil\n}\n","sourceCodeStart":143,"sourceCodeEnd":173,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v2/grpc/factory.go#L143-L173","documentation":"The factory failed to establish the gRPC client connection used by the trace reader (and metrics/query reader path). The underlying dial error is wrapped, so the cause (DNS, TLS, auth, unreachable server) is inside the chain.","triggerScenarios":"initializeConnections calls createConn for the reader's ClientConfig and the gRPC dial fails: bad endpoint, TLS misconfiguration, dead server, invalid credentials.","commonSituations":"Wrong reader endpoint host/port; remote storage not started; TLS certificate/CA mismatch; bearer token not supplied when auth is required.","solutions":["Read the wrapped cause to identify dial vs TLS vs auth failure","Verify the reader endpoint and that the remote storage server is reachable (nc/curl the port)","Check TLS settings: ca, cert, key files and server name override","Ensure auth credentials (bearer token file) are configured if required"],"exampleFix":"// before\ngrpc:\n  endpoint: remote-storage:17271\n// after (correct port)\ngrpc:\n  endpoint: remote-storage:17271\n  tls:\n    insecure: true","handlingStrategy":"validation","validationCode":"// before creating the factory\ntimeout, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\nconn, err := grpc.NewClient(readerCfg.Endpoint, ...)\nif err != nil || pingFails(timeout, conn) { /* endpoint unreachable */ }","typeGuard":null,"tryCatchPattern":"err := factory.Initialize()\nif err != nil {\n    var wrapped error\n    if errors.As(err, &wrapped) {\n        log.Printf(\"reader conn failure cause: %v\", wrapped)\n    }\n    return err\n}","preventionTips":["Smoke-test endpoints with nc/curl before deploy","Verify TLS ca/cert/key paths exist","Supply bearer token file when auth is enabled"],"tags":["grpc","network","configuration"],"backgroundTag":"connection-refused","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}