{"record":{"id":"85b5117dddaf8eb2","repo":"jaegertracing/jaeger","slug":"cannot-read-embedded-all-in-one-configuration-w","errorCode":null,"errorMessage":"cannot read embedded all-in-one configuration: %w","messagePattern":"cannot read embedded all-in-one configuration: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/command.go","lineNumber":94,"sourceCode":"\tcmd.AddCommand(mappings.Command())\n\tconfig.AddFlags(v, cmd)\n\n\treturn cmd\n}\n\nfunc checkConfigAndRun(\n\tcmd *cobra.Command,\n\targs []string,\n\tgetCfg func(name string) ([]byte, error),\n\trunE func(cmd *cobra.Command, args []string) error,\n) error {\n\tconfigFlag := cmd.Flag(\"config\")\n\tif !configFlag.Changed {\n\t\tlog.Print(\"No '--config' flags detected, using default All-in-One configuration with memory storage.\")\n\t\tlog.Print(\"To customize All-in-One behavior, pass a proper configuration.\")\n\t\tdata, err := getCfg(\"all-in-one.yaml\")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"cannot read embedded all-in-one configuration: %w\", err)\n\t\t}\n\t\tconfigFlag.Value.Set(\"yaml:\" + string(data))\n\t}\n\treturn runE(cmd, args)\n}\n","sourceCodeStart":76,"sourceCodeEnd":100,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/command.go#L76-L100","documentation":"When `jaeger` (all-in-one) is run without a --config flag, checkConfigAndRun falls back to an embedded all-in-one.yaml (memory storage) loaded via getCfg. If reading that embedded asset fails, startup aborts with this wrapped error. This should essentially never happen in a normal build — it indicates a corrupted/incomplete binary or an embed issue.","triggerScenarios":"Running the jaeger all-in-one binary with no --config flag while getCfg(\"all-in-one.yaml\") fails — the embedded FS asset missing/corrupt, a broken build embedding, or filesystem/IO errors in the embed retrieval path.","commonSituations":"Custom builds with modified embed directives that excluded the YAML; stripped/truncated binaries distributed incorrectly; running a mismatched binary artifact from CI.","solutions":["Rebuild or re-download an official, unmodified jaeger binary — the embedded config ships inside the executable","As a workaround, pass an explicit config: `jaeger --config ./all-in-one.yaml` (or your own) to bypass the embedded asset entirely","Verify the build did not alter/remove the go:embed directive covering all-in-one.yaml in cmd/jaeger","Check the wrapped `%w` cause for the concrete IO/embed error before rebuilding"],"exampleFix":"// before\n./jaeger  # relies on embedded config, asset missing\n// after\n./jaeger --config ./all-in-one.yaml","handlingStrategy":"try-catch","validationCode":"// Verify the binary embeds the default config before relying on it\n// (run at build/CI time)\n// go run ./cmd/jaeger --help  # binary starts => embed is intact\nif _, err := fs.ReadFile(assetFS, \"all-in-one.yaml\"); err != nil {\n    log.Fatalf(\"embedded all-in-one.yaml missing from build: %v\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := runJaeger(); err != nil {\n    if strings.Contains(err.Error(), \"cannot read embedded all-in-one configuration\") {\n        // fall back to an explicit config file\n        return runWithConfig(\"./all-in-one.yaml\")\n    }\n    return err\n}","preventionTips":["Always pass an explicit --config in production instead of relying on the embedded default","Use official release binaries or unmodified builds so go:embed assets ship intact","In CI, smoke-test the binary with no --config to catch broken embeds","Keep the go:embed directive for all-in-one.yaml untouched in custom builds"],"tags":["config","startup","embedded-assets"],"backgroundTag":"embedded-asset-read-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}