{"record":{"id":"a20e1ea60408aa9e","repo":"quickwit-oss/quickwit","slug":"gossip-protocol-version-must-be-between-0-and-max","errorCode":null,"errorMessage":"gossip protocol version must be between 0 and {MAX_GOSSIP_PROTOCOL_VERSION}, got `{gossip_protocol_version}`","messagePattern":"gossip protocol version must be between 0 and (.+?), got `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/node_config/serialize.rs","lineNumber":359,"sourceCode":"            .default_index_root_uri\n            .resolve_optional(env_vars)?\n            .unwrap_or_else(|| default_index_root_uri(&data_dir_uri));\n\n        self.storage_configs.validate()?;\n        self.storage_configs.apply_flavors();\n        self.ingest_api_config.validate()?;\n        self.searcher_config.validate()?;\n\n        let gossip_interval = self\n            .gossip_interval_ms\n            .resolve_optional(env_vars)?\n            .map(|gossip_interval_ms| Duration::from_millis(gossip_interval_ms as u64))\n            .unwrap_or(DEFAULT_GOSSIP_INTERVAL);\n        let gossip_protocol_version = self\n            .gossip_protocol_version\n            .resolve_optional(env_vars)?\n            .unwrap_or(DEFAULT_GOSSIP_PROTOCOL_VERSION);\n        ensure!(\n            gossip_protocol_version <= MAX_GOSSIP_PROTOCOL_VERSION,\n            \"gossip protocol version must be between 0 and {MAX_GOSSIP_PROTOCOL_VERSION}, got \\\n             `{gossip_protocol_version}`\"\n        );\n\n        let node_config = NodeConfig {\n            cluster_id: self.cluster_id.resolve(env_vars)?,\n            node_id,\n            availability_zone,\n            enabled_services: resolved_enabled_services,\n            gossip_listen_addr,\n            grpc_listen_addr,\n            gossip_advertise_addr,\n            grpc_advertise_addr,\n            gossip_interval,\n            gossip_protocol_version,\n            peer_seeds: self.peer_seeds.resolve(env_vars)?.0,\n            data_dir_path,","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/node_config/serialize.rs#L341-L377","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Align the Quickwit version across the cluster so the configured protocol version is supported by all nodes.","Check the env var overriding the setting and unset/correct it if it carries an out-of-range value."],"exampleFix":"// before (quickwit.yaml)\ncluster:\n  gossip_protocol_version: 99\n\n// after (quickwit.yaml)\ncluster:\n  gossip_protocol_version: 1   # or omit to use the default","handlingStrategy":"validation","validationCode":"const MAX_GOSSIP_PROTOCOL_VERSION: u32 = 10; // match the crate constant\nlet v: u32 = config.cluster.gossip_protocol_version;\nif v > MAX_GOSSIP_PROTOCOL_VERSION { panic!(\"gossip_protocol_version {} out of range\", v); }","typeGuard":"fn valid_gossip_version(v: u64) -> bool { v <= 10 /* MAX_GOSSIP_PROTOCOL_VERSION */ }","tryCatchPattern":"match load_node_config_with_env(&env) {\n    Err(e) if e.to_string().contains(\"gossip protocol version\") => revert_to_default_gossip_version(),\n    other => other?,\n}","preventionTips":["Omit gossip_protocol_version unless deliberately migrating protocol versions.","Pin one Quickwit version across the cluster so configs are portable.","Lint config templates for out-of-range cluster values before rollout."],"tags":["config","validation","cluster","gossip"],"backgroundTag":"value-out-of-range","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}