quickwit-oss/quickwit · error

gossip protocol version must be between 0 and {MAX_GOSSIP_PR

Error message

gossip protocol version must be between 0 and {MAX_GOSSIP_PROTOCOL_VERSION}, got `{gossip_protocol_version}`

What it means

The chitchat gossip protocol version configured for the cluster must be a non-negative integer no greater than MAX_GOSSIP_PROTOCOL_VERSION. `build_and_validate` resolves the value from config/env (defaulting when unset) and `ensure!`s the upper bound; a larger value means this node speaks a gossip protocol the cluster cannot negotiate, so startup is refused.

Source

Thrown at quickwit/quickwit-config/src/node_config/serialize.rs:359

            .default_index_root_uri
            .resolve_optional(env_vars)?
            .unwrap_or_else(|| default_index_root_uri(&data_dir_uri));

        self.storage_configs.validate()?;
        self.storage_configs.apply_flavors();
        self.ingest_api_config.validate()?;
        self.searcher_config.validate()?;

        let gossip_interval = self
            .gossip_interval_ms
            .resolve_optional(env_vars)?
            .map(|gossip_interval_ms| Duration::from_millis(gossip_interval_ms as u64))
            .unwrap_or(DEFAULT_GOSSIP_INTERVAL);
        let gossip_protocol_version = self
            .gossip_protocol_version
            .resolve_optional(env_vars)?
            .unwrap_or(DEFAULT_GOSSIP_PROTOCOL_VERSION);
        ensure!(
            gossip_protocol_version <= MAX_GOSSIP_PROTOCOL_VERSION,
            "gossip protocol version must be between 0 and {MAX_GOSSIP_PROTOCOL_VERSION}, got \
             `{gossip_protocol_version}`"
        );

        let node_config = NodeConfig {
            cluster_id: self.cluster_id.resolve(env_vars)?,
            node_id,
            availability_zone,
            enabled_services: resolved_enabled_services,
            gossip_listen_addr,
            grpc_listen_addr,
            gossip_advertise_addr,
            grpc_advertise_addr,
            gossip_interval,
            gossip_protocol_version,
            peer_seeds: self.peer_seeds.resolve(env_vars)?.0,
            data_dir_path,

View on GitHub (pinned to a39730c5cd)

Solutions

  1. Set `gossip_protocol_version` (config or env var) to a value between 0 and MAX_GOSSIP_PROTOCOL_VERSION, e.g. remove the key to use DEFAULT_GOSSIP_PROTOCOL_VERSION.
  2. Align the Quickwit version across the cluster so the configured protocol version is supported by all nodes.
  3. Check the env var overriding the setting and unset/correct it if it carries an out-of-range value.

Example fix

// before (quickwit.yaml)
cluster:
  gossip_protocol_version: 99

// after (quickwit.yaml)
cluster:
  gossip_protocol_version: 1   # or omit to use the default
Defensive patterns

Strategy: validation

Validate before calling

const MAX_GOSSIP_PROTOCOL_VERSION: u32 = 10; // match the crate constant
let v: u32 = config.cluster.gossip_protocol_version;
if v > MAX_GOSSIP_PROTOCOL_VERSION { panic!("gossip_protocol_version {} out of range", v); }

Type guard

fn valid_gossip_version(v: u64) -> bool { v <= 10 /* MAX_GOSSIP_PROTOCOL_VERSION */ }

Try / catch

match load_node_config_with_env(&env) {
    Err(e) if e.to_string().contains("gossip protocol version") => revert_to_default_gossip_version(),
    other => other?,
}

Prevention

When it happens

Trigger: Setting `gossip_protocol_version` in the node config or via the corresponding env var to a value > MAX_GOSSIP_PROTOCOL_VERSION (e.g. copying a config from a newer/older Quickwit version), causing build_and_validate (called by load_node_config_with_env) to fail.

Common situations: Rolling upgrades where an operator pre-sets a future protocol version; copy-pasted configs between clusters running different Quickwit versions; fat-fingered large values in the config or environment variable.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/a20e1ea60408aa9e. Report an issue: GitHub.