{"record":{"id":"f2fea2c9f0adddba","repo":"jaegertracing/jaeger","slug":"could-not-create-jaeger-query-w","errorCode":null,"errorMessage":"could not create jaeger-query: %w","messagePattern":"could not create jaeger-query: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/server.go","lineNumber":144,"sourceCode":"\t\t\tArchiveStorage:           archiveStorage,\n\t\t\tMetricsStorage:           metricsStorage,\n\t\t\tSearchWithoutServiceName: searchWithoutServiceName,\n\t\t\tAIAssistant:              s.aiHealth != nil && s.aiHealth.Current(),\n\t\t}\n\t}\n\n\ts.server, err = queryapp.NewServer(\n\t\tctx,\n\t\t// TODO propagate healthcheck updates up to the collector's runtime\n\t\tqs,\n\t\tmqs,\n\t\t&s.config.QueryOptions,\n\t\tbackendCaps,\n\t\ttm,\n\t\ttelset,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not create jaeger-query: %w\", err)\n\t}\n\n\tif err := s.server.Start(ctx); err != nil {\n\t\treturn fmt.Errorf(\"could not start jaeger-query: %w\", err)\n\t}\n\n\t// Start the health checker only after the query server is up — a failed\n\t// server start (e.g. port bind error) returns an error from Start, and\n\t// the OTel collector does not call Shutdown in that case. Starting the\n\t// checker first would leak its goroutine forever. The checker is given a\n\t// fresh background context because the Start context is cancelled when\n\t// Start returns; Shutdown stops the checker explicitly.\n\tif s.aiHealth != nil {\n\t\ts.aiHealth.Start(context.Background()) //nolint:contextcheck // intentional: checker outlives Start ctx; Shutdown stops it.\n\t}\n\n\treturn nil\n}","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/server.go#L126-L162","documentation":"After assembling readers and options, Start constructs the actual query HTTP/gRPC server via queryapp.NewServer. If server construction fails (invalid query options, bad listen addresses/ports in config, etc.), the error is wrapped as 'could not create jaeger-query'.","triggerScenarios":"queryapp.NewServer returns an error — typically invalid QueryOptions configuration such as malformed HTTP/gRPC endpoints, invalid base path, or failure building server components from config.","commonSituations":"Invalid http/grpc endpoint strings or reserved ports in query options; base_path conflicts; misconfigured tenancy or TLS options rejected at construction time.","solutions":["Inspect the wrapped error for which server option failed validation","Fix the http/grpc endpoint and base_path values in the jaeger_query extension config","Validate TLS/tenancy settings (cert file paths exist, formats valid)","Try a minimal known-good query options config to isolate the failing field"],"exampleFix":"// before\njaeger_query:\n  grpc:\n    endpoint: \":0grpc\"\n// after\njaeger_query:\n  grpc:\n    endpoint: \":16685\"","handlingStrategy":"validation","validationCode":"// Validate query options before Start\nfor _, ep := range []string{cfg.QueryOptions.HTTP.Endpoint, cfg.QueryOptions.GRPC.Endpoint} {\n\tif _, _, err := net.SplitHostPort(ep); err != nil {\n\t\treturn fmt.Errorf(\"invalid endpoint %q: %w\", ep, err)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := ext.Start(ctx, host); err != nil {\n\tif strings.Contains(err.Error(), \"could not create jaeger-query\") {\n\t\tlog.Fatalf(\"query server construction failed: %v — check query options\", err)\n\t}\n\treturn err\n}","preventionTips":["Validate endpoint strings, base_path, and TLS file paths before deploy","Start from a known-good sample config and diff changes","Run config linting in CI for the collector config","Avoid exotic characters in endpoint/base_path values"],"tags":["go","config","grpc","http-server"],"backgroundTag":"invalid-server-config","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}