{"record":{"id":"ad1ecbde2bff3ada","repo":"jaegertracing/jaeger","slug":"cannot-find-traces-archive-storage-factory-w","errorCode":null,"errorMessage":"cannot find traces archive storage factory: %w","messagePattern":"cannot find traces archive storage factory: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/server.go","lineNumber":203,"sourceCode":"\t\tCheck:    aihealth.NewACPCheck(aiCfg.AgentURL, aiCfg.AgentHeaders, logger),\n\t\tInterval: aiCfg.HealthCheckInterval,\n\t\tTimeout:  aiCfg.HealthCheckTimeout,\n\t\tLogger:   logger,\n\t}\n}\n\nfunc (s *server) addArchiveStorage(\n\topts *querysvc.QueryServiceOptions,\n\thost component.Host,\n) error {\n\tif s.config.Storage.TracesArchive == \"\" {\n\t\ts.telset.Logger.Info(\"Archive storage not configured\")\n\t\treturn nil\n\t}\n\n\tf, err := jaegerstorage.GetTraceStoreFactory(s.config.Storage.TracesArchive, host)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot find traces archive storage factory: %w\", err)\n\t}\n\n\ttraceReader, traceWriter := s.initArchiveStorage(f)\n\tif traceReader == nil || traceWriter == nil {\n\t\treturn nil\n\t}\n\n\topts.ArchiveTraceReader = traceReader\n\topts.ArchiveTraceWriter = traceWriter\n\n\treturn nil\n}\n\nfunc (s *server) initArchiveStorage(f tracestore.Factory) (tracestore.Reader, tracestore.Writer) {\n\treader, err := f.CreateTraceReader()\n\tif err != nil {\n\t\ts.telset.Logger.Error(\"Cannot init traces archive storage reader\", zap.Error(err))\n\t\treturn nil, nil","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/server.go#L185-L221","documentation":"addArchiveStorage is invoked only when archive storage is configured; it looks up the archive trace store factory by Storage.TracesArchive name. If jaegerstorage.GetTraceStoreFactory cannot find that factory in the host, the error 'cannot find traces archive storage factory' is returned.","triggerScenarios":"config.Storage.TracesArchive is set (non-empty) but no jaeger_storage backend with that exact name exists/started in the collector.","commonSituations":"Typo in the archive storage name; archive backend removed from config while traces_archive still references it; archive storage defined in a different collector instance than the query extension.","solutions":["Define a jaeger_storage backend whose name matches storage.traces_archive","Fix the archive storage name spelling in the query extension config","If archive storage is not wanted, remove the traces_archive key so addArchiveStorage is skipped","Verify the archive backend extension started successfully before the query extension"],"exampleFix":"// before\njaeger_storage:\n  backends:\n    main: {badger: {}}\njaeger_query:\n  storage:\n    traces_archive: archive-es  # undefined\n// after\njaeger_storage:\n  backends:\n    main: {badger: {}}\n    archive-es: {elasticsearch: {server_urls: [\"http://es:9200\"]}}\njaeger_query:\n  storage:\n    traces_archive: archive-es","handlingStrategy":"validation","validationCode":"// Only set traces_archive if the backend is actually defined\nif cfg.Storage.TracesArchive != \"\" {\n\tif _, ok := storageBackends[cfg.Storage.TracesArchive]; !ok {\n\t\treturn fmt.Errorf(\"archive backend %q not defined\", cfg.Storage.TracesArchive)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := ext.Start(ctx, host); err != nil {\n\tif strings.Contains(err.Error(), \"cannot find traces archive storage factory\") {\n\t\tlog.Fatalf(\"archive backend %q missing — define it or unset traces_archive\", archiveName)\n\t}\n\treturn err\n}","preventionTips":["Keep traces_archive and the jaeger_storage backends key identical","Unset traces_archive when archive storage is not deployed","Define archive and query in the same collector config","Lint the collector config in CI to catch dangling references"],"tags":["go","config","storage","archive"],"backgroundTag":"storage-factory-not-found","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}