{"record":{"id":"9fb55bb80e7f9f82","repo":"jaegertracing/jaeger","slug":"error-creating-writer-client-connection-w","errorCode":null,"errorMessage":"error creating writer client connection: %w","messagePattern":"error creating writer client connection: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v2/grpc/factory.go","lineNumber":166,"sourceCode":"\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":148,"sourceCodeEnd":173,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v2/grpc/factory.go#L148-L173","documentation":"Same as the reader connection error but for the writer gRPC connection. On failure the factory closes the already-created reader connection before returning, leaving no partially initialized factory.","triggerScenarios":"initializeConnections succeeds dialing the reader but fails dialing the writer endpoint (e.g. separate writer config pointing at an unreachable or misconfigured server).","commonSituations":"Writer endpoint configured to a different host than the reader that is down; TLS/auth misconfiguration only on the writer block; typo in writer endpoint.","solutions":["Read the wrapped cause for the writer dial failure","Verify the writer endpoint differs intentionally from the reader and is reachable","Match TLS/auth settings between reader and writer unless they genuinely differ","Ensure the writer-side remote storage service is running"],"exampleFix":"// before\nwriter:\n  endpoint: storage-writer:17272\n// after\nwriter:\n  endpoint: remote-storage:17271","handlingStrategy":"validation","validationCode":"// verify writer endpoint reachability before Initialize\ntimeout, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\nif !reachable(writerCfg.Endpoint, timeout) { /* fail fast */ }","typeGuard":null,"tryCatchPattern":"err := factory.Initialize()\nif err != nil && strings.Contains(err.Error(), \"writer client connection\") {\n    // check writer-specific endpoint/TLS config\n    return err\n}","preventionTips":["Dial both reader and writer endpoints in a readiness probe","Keep writer TLS/auth config consistent with reader unless distinct","Check logs for the wrapped cause naming the writer leg"],"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"}