{"record":{"id":"84152127f943ab2e","repo":"influxdata/influxdb","slug":"lost-admin-token-recovery-service","errorCode":null,"errorMessage":"lost admin token recovery service","messagePattern":"lost admin token recovery service","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"influxdb3/src/commands/serve.rs","lineNumber":159,"sourceCode":"    #[error(\"failed to initialize write buffer: {0:?}\")]\n    WriteBufferInit(#[source] anyhow::Error),\n\n    #[error(\"failed to initialize catalog: {0}\")]\n    InitializeCatalog(#[source] CatalogError),\n\n    #[error(\"failed to initialize last cache: {0}\")]\n    InitializeLastCache(#[source] last_cache::Error),\n\n    #[error(\"failed to initialize distinct cache: {0:#}\")]\n    InitializeDistinctCache(#[source] influxdb3_cache::distinct_cache::ProviderError),\n\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\"","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3/src/commands/serve.rs#L141-L177","documentation":"Variant of the serve command's Error enum in influxdb3. It is returned when the admin token recovery service task, spawned during server startup, terminates unexpectedly. The server treats loss of this service as fatal because admin token recovery is required for token management without a pre-existing admin token.","triggerScenarios":"The tokio task running the admin token recovery HTTP service panics, returns an error, or its JoinHandle resolves with a failure while `influxdb3 serve` is running.","commonSituations":"Runtime panics inside the recovery service handler, port binding or listener failures for the recovery endpoint, or shutdown races where the service future is dropped/aborted early.","solutions":["Inspect server logs immediately preceding the error for a panic or listener failure in the admin token recovery service.","Verify the admin token recovery HTTP port is not already in use or blocked by firewall settings.","Upgrade to a newer influxdb3 release where recovery-service startup failures are reported with more detail.","Restart the server; if reproducible, file an issue with the logs and startup flags."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"match server_handle.await {\n    Err(Error::LostAdminTokenRecovery) => {\n        log::error!(\"admin token recovery service died; restart and inspect logs\");\n        // attempt restart with backoff\n    }\n    Ok(v) => v,\n    Err(e) => return Err(e),\n}","preventionTips":["Monitor the recovery service task health during startup.","Keep the recovery endpoint port free and verified before launch.","Pin to influxdb3 versions where recovery-service panics are fixed."],"tags":["startup","service-lifecycle","influxdb3"],"backgroundTag":"internal-invariant-violation","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"}