block/buzz · error · anyhow::Error

Configuration error: {error}

Error message

Configuration error: {error}

What it means

Raised in run_relay_main when relay configuration loading/parsing fails (the generic guard at the boot.run_required config phase). The input at fault is the environment/`.env`-derived configuration: missing required values, malformed fields, or invalid combinations. Fatal — the relay logs 'Configuration error: {error}' and exits before binding any services, since running with an invalid config would be unsafe.

Source

Thrown at crates/buzz-relay/src/main.rs:202

        telemetry::TracerInit::Disabled => tracing_init.succeed(),
        telemetry::TracerInit::ExporterBuildFailed(_) => {
            tracing_init.degrade(LifecycleReason::ExporterBuild);
            boot.mark_degraded(LifecycleReason::ExporterBuild);
            // Do not log the raw exporter error: OTLP endpoint URLs can carry
            // credentials. The bounded lifecycle reason is sufficient here.
            warn!("Failed to build OTLP trace exporter; distributed tracing disabled");
        }
    }

    info!("Starting buzz-relay");

    let (next_boot, config) = boot
        .run_required(StartupPhase::ConfigLoad, Config::from_env, |_error| {
            LifecycleReason::ConfigInvalid
        })
        .map_err(|error| {
            error!("Invalid configuration: {error}");
            anyhow::anyhow!("Configuration error: {error}")
        })?;
    boot = next_boot;

    let key_failure = if config.relay_private_key.is_some() {
        LifecycleReason::RequiredInvalid
    } else {
        LifecycleReason::Missing
    };
    let (next_boot, relay_keypair) = boot.run_required(
        StartupPhase::KeyLoad,
        || relay_keypair_from_config(config.relay_private_key.as_deref()),
        |_error| key_failure,
    )?;
    boot = next_boot;
    info!(
        bind_addr = %config.bind_addr,
        relay_url = %config.relay_url,
        health_port = config.health_port,

View on GitHub (pinned to dad5a33865)

Solutions

  1. Read the chained error to identify the exact missing or malformed config field and fix .env / environment variables accordingly
  2. Compare the configuration against .env.example for required keys and expected formats
  3. Validate database/Redis URLs, listen addresses, and key material before restarting
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/buzz-relay/src/main.rs:202 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of block/buzz@dad5a33865 (2026-09-05). Data as JSON: /api/errors/537804a049643f90. Report an issue: GitHub.