influxdata/influxdb · error · Error

`tokio_console` feature not enabled

Error message

`tokio_console` feature not enabled

What it means

A trogging `Error` variant (`TokioConsoleMissing`) returned when tokio-console support is requested but the crate was built without the `tokio_console` cargo feature enabled. The tokio-console subscriber integration is feature-gated, so asking for it in an unenabled build is a configuration error, not a runtime failure.

Solutions

  1. Rebuild with the feature: `cargo build --features tokio_console` (plus any bin features).
  2. Remove the tokio-console option/binding from the serve configuration if console introspection is not needed.
  3. Use a prebuilt binary that includes the tokio_console feature.

Example fix

// before
cargo build --release
influxdb3 serve ... --tokio-console-bind-addr 127.0.0.1:6669
// after
cargo build --release --features tokio_console
influxdb3 serve ... --tokio-console-bind-addr 127.0.0.1:6669
Defensive patterns

Strategy: validation

Validate before calling

#[cfg(not(feature = "tokio_console"))]
compile_error!("tokio_console requested without enabling the tokio_console feature");

Try / catch

if let Err(trogging::Error::TokioConsoleMissing) = init_result {
    eprintln!("rebuild with --features tokio_console to use tokio-console");
}

Prevention

When it happens

Trigger: Building trogging/`influxdb3 serve` with tokio-console options supplied (e.g. `--tokio-console-bind-addr`) while the binary was compiled without `--features tokio_console`.

Common situations: Running a release/prebuilt binary (built without the feature) and passing tokio-console flags; enabling console tracing in config without rebuilding with the feature.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/08bb61ec7f68b2e4. Report an issue: GitHub.

Appendix: source

Thrown at core/trogging/src/lib.rs:43

/// Maximum length of a log line.
/// Space for a final trailing newline if truncated.
///
/// Docker "chunks" log message in 16KB chunks. The log driver receives log lines in such chunks
/// but not all of the log drivers properly recombine the lines, and even those who do have their
/// own max buffer sizes (e.g. for our fluentd config it's 32KB).
/// To avoid surprises, for now, let's just truncate log lines right below 16K and make sure
/// they are properly terminated with a newline if they were so before the truncation.
const MAX_LINE_LENGTH: usize = 16 * 1024 - 1;

#[derive(Debug, Error)]
pub enum Error {
    #[error("Cannot set global tracing subscriber")]
    SetGlobalDefaultError(#[from] tracing::dispatcher::SetGlobalDefaultError),

    #[error("Cannot set global log subscriber")]
    SetLoggerError(#[from] tracing_log::log_tracer::SetLoggerError),

    #[error("`tokio_console` feature not enabled")]
    TokioConsoleMissing,
}

pub type Result<T, E = Error> = std::result::Result<T, E>;

/// Builder to configure tracing and logging.
#[derive(Debug)]
pub struct Builder<W = fn() -> io::Stdout> {
    log_format: LogFormat,
    log_filter: Option<EnvFilter>,
    // used when log_filter is none.
    default_log_filter: EnvFilter,
    make_writer: W,
    with_target: bool,
    with_ansi: bool,
}

impl Default for Builder {

View on GitHub (pinned to 06200ef96b)