jaegertracing/jaeger · error

cannot read embedded all-in-one configuration: %w

Error message

cannot read embedded all-in-one configuration: %w

What it means

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.

Source

Thrown at cmd/jaeger/internal/command.go:94

	cmd.AddCommand(mappings.Command())
	config.AddFlags(v, cmd)

	return cmd
}

func checkConfigAndRun(
	cmd *cobra.Command,
	args []string,
	getCfg func(name string) ([]byte, error),
	runE func(cmd *cobra.Command, args []string) error,
) error {
	configFlag := cmd.Flag("config")
	if !configFlag.Changed {
		log.Print("No '--config' flags detected, using default All-in-One configuration with memory storage.")
		log.Print("To customize All-in-One behavior, pass a proper configuration.")
		data, err := getCfg("all-in-one.yaml")
		if err != nil {
			return fmt.Errorf("cannot read embedded all-in-one configuration: %w", err)
		}
		configFlag.Value.Set("yaml:" + string(data))
	}
	return runE(cmd, args)
}

View on GitHub (pinned to 806f444784)

Solutions

  1. Rebuild or re-download an official, unmodified jaeger binary — the embedded config ships inside the executable
  2. As a workaround, pass an explicit config: `jaeger --config ./all-in-one.yaml` (or your own) to bypass the embedded asset entirely
  3. Verify the build did not alter/remove the go:embed directive covering all-in-one.yaml in cmd/jaeger
  4. Check the wrapped `%w` cause for the concrete IO/embed error before rebuilding

Example fix

// before
./jaeger  # relies on embedded config, asset missing
// after
./jaeger --config ./all-in-one.yaml
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the binary embeds the default config before relying on it
// (run at build/CI time)
// go run ./cmd/jaeger --help  # binary starts => embed is intact
if _, err := fs.ReadFile(assetFS, "all-in-one.yaml"); err != nil {
    log.Fatalf("embedded all-in-one.yaml missing from build: %v", err)
}

Try / catch

if err := runJaeger(); err != nil {
    if strings.Contains(err.Error(), "cannot read embedded all-in-one configuration") {
        // fall back to an explicit config file
        return runWithConfig("./all-in-one.yaml")
    }
    return err
}

Prevention

When it happens

Trigger: 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.

Common situations: Custom builds with modified embed directives that excluded the YAML; stripped/truncated binaries distributed incorrectly; running a mismatched binary artifact from CI.

Related errors


AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01). Data as JSON: /api/errors/85b5117dddaf8eb2. Report an issue: GitHub.