{"record":{"id":"65dbf38dd98923e6","repo":"influxdata/influxdb","slug":"environment-variable-0-named-by-node-id-from-env-influxdb3","errorCode":null,"errorMessage":"environment variable {0} (named by --node-id-from-env / INFLUXDB3_NODE_ID_FROM_ENV) must be set to a valid node id","messagePattern":"environment variable (.+?) \\(named by --node-id-from-env / INFLUXDB3_NODE_ID_FROM_ENV\\) must be set to a valid node id","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3/src/commands/serve.rs","lineNumber":170,"sourceCode":"\n    #[error(\"lost backend\")]\n    LostBackend,\n\n    #[error(\"lost HTTP/gRPC service\")]\n    LostHttpGrpc,\n\n    #[error(\"lost admin token recovery service\")]\n    LostAdminTokenRecovery,\n\n    #[error(\"tls requires both a cert and a key file to be passed in to work\")]\n    NoCertOrKeyFile,\n\n    #[error(\"table cache index initialization failed: {0}\")]\n    TableIndexCacheInitialization(\n        #[source] influxdb3_write::table_index_cache::TableIndexCacheError,\n    ),\n\n    #[error(\n        \"environment variable {0} (named by --node-id-from-env / INFLUXDB3_NODE_ID_FROM_ENV) \\\n        must be set to a valid node id\"\n    )]\n    NodeIdEnvVarMissing(String),\n\n    #[error(\n        \"Python environment initialization failed: {0}\\nPlease ensure Python and pip package manager is installed\"\n    )]\n    PythonEnvironmentInitialization(\n        #[source] influxdb3_processing_engine::environment::PluginEnvironmentError,\n    ),\n}\n\npub type Result<T, E = Error> = std::result::Result<T, E>;\n\n// variable name and migration message tuples\nconst DEPRECATED_ENV_VARS: &[(&str, &str)] = &[(\n    \"INFLUXDB3_PARQUET_MEM_CACHE_SIZE_MB\",","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3/src/commands/serve.rs#L152-L188","documentation":"Returned when the node id cannot be determined from the environment variable named by `--node-id-from-env` (default/INFLUXDB3_NODE_ID_FROM_ENV). The variable is either unset or its value does not parse as a valid node id. The offending variable name is included in the message ({0}).","triggerScenarios":"Starting `influxdb3 serve` with `--node-id-from-env VAR` where VAR is not set, or set to a non-integer/unparsable string.","commonSituations":"Container/orchestrator configs that forgot to inject the env var, typos in the variable name, or a value like \"node-1\" instead of a numeric id.","solutions":["Set the named environment variable to a valid numeric node id, e.g. export INFLUXDB3_NODE_ID_FROM_ENV=1.","Verify the exact variable name passed to --node-id-from-env matches what is exported in the environment.","Alternatively drop --node-id-from-env and pass an explicit --node-id."],"exampleFix":"# before\ninfluxdb3 serve --node-id-from-env HOST_ID   # HOST_ID unset\n# after\nexport HOST_ID=1\ninfluxdb3 serve --node-id-from-env HOST_ID","handlingStrategy":"validation","validationCode":"let var = std::env::var(\"INFLUXDB3_NODE_ID_FROM_ENV\")\n    .map_err(|_| \"INFLUXDB3_NODE_ID_FROM_ENV must be set\")?;\nlet id: u64 = var.parse().map_err(|_| \"node id must be a valid number\")?;","typeGuard":"fn valid_node_id(v: Option<&str>) -> bool {\n    v.map(|s| s.parse::<u64>().is_ok()).unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Export the env var in every deployment manifest that uses --node-id-from-env.","Keep node id values numeric and unique per node.","Validate env vars in entrypoint scripts before exec'ing the server."],"tags":["environment","configuration","cli"],"backgroundTag":"invalid-env-var-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"}