{"record":{"id":"5d7a81552c96d2c8","repo":"influxdata/influxdb","slug":"node-doesn-t-have-proper-mode-expect-expected","errorCode":null,"errorMessage":"Node doesn't have proper mode, expect {expected}","messagePattern":"Node doesn't have proper mode, expect (.+?)","errorType":"validation","errorClass":"EnterpriseCatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error/enterprise.rs","lineNumber":31,"sourceCode":"            NodeMode::Core => \"core\",\n            NodeMode::Query => \"query\",\n            NodeMode::Ingest => \"ingest\",\n            NodeMode::Compact => \"compact\",\n            NodeMode::Process => \"process\",\n            NodeMode::All => \"all\",\n        }\n    }\n}\n\nimpl std::fmt::Display for NodeMode {\n    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n        write!(f, \"{}\", self.as_str())\n    }\n}\n\n#[derive(Debug, thiserror::Error, Clone, Copy)]\npub enum EnterpriseCatalogError {\n    #[error(\"Node doesn't have proper mode, expect {expected}\")]\n    InvalidNodeMode { expected: NodeMode },\n\n    #[error(\n        \"too many compacted generations requested, maximum allowed: 254, requested: {requested}\"\n    )]\n    TooManyCompactedGenerations { requested: usize },\n\n    #[error(\"gen1 duration is not configured in the catalog\")]\n    MissingGen1Duration,\n\n    #[error(\n        \"gen2 duration must be an even multiple of gen1 duration, \\\n        provided gen2 duration: {gen2_duration_secs} seconds, \\\n        existing gen1 duration: {gen1_duration_secs} seconds\"\n    )]\n    InvalidGen2Duration {\n        gen2_duration_secs: u64,\n        gen1_duration_secs: u64,","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error/enterprise.rs#L13-L49","documentation":"EnterpriseCatalogError::InvalidNodeMode, a thiserror catalog error in the Enterprise edition. It is returned when a node's configured NodeMode does not match the mode required by the operation being performed (e.g. calling an operation that expects a specific all/compat/compactor role). It carries the `expected` NodeMode so the caller knows which mode was required.","triggerScenarios":"Calling an Enterprise catalog operation gated on a node role — e.g. issuing catalog reads/writes reserved for a particular NodeMode from a node started with a different --node-mode (all, write, query, compactor).","commonSituations":"Starting a node with a restrictive mode and then running operations meant for an `all` node; cluster topology changes where a node was repurposed but its mode flag was not updated; copying one node's config to another.","solutions":["Restart the node with the required mode: `influxdb3 serve --node-mode <expected>`.","Check the node's current mode in the catalog (`show nodes` or the node definition) and compare to the operation's requirement.","Update deployment scripts/systemd units/ Helm charts so each node's --node-mode matches its intended role.","Route role-restricted operations to a node that has the expected mode."],"exampleFix":"// before\ninfluxdb3 serve --node-mode query  # then runs compaction ops\n// after\ninfluxdb3 serve --node-mode all    # or route compaction to a compactor-mode node","handlingStrategy":"validation","validationCode":"// shell: check node mode before running role-restricted ops\ncurrent_mode=$(influxdb3 show nodes | jq -r '.[] | select(.id==ENV.NODE_ID) | .mode');\n[ \"$current_mode\" = \"all\" ] || echo \"node must run in required mode\"","typeGuard":null,"tryCatchPattern":"// Rust caller\nmatch catalog_result {\n    Err(EnterpriseCatalogError::InvalidNodeMode { expected }) => {\n        eprintln!(\"restart node with --node-mode {:?}\", expected);\n    }\n    other => other?,\n}","preventionTips":["Pin --node-mode per node in deployment configs (systemd, Helm, etc.)","Match node role to the operations scheduled on it","Re-check node mode after topology or failover changes","Avoid copying node configs across differently-roled nodes"],"tags":["enterprise","node-mode","configuration","catalog"],"backgroundTag":"invalid-config-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}