{"record":{"id":"f496b5677eefe1e6","repo":"databendlabs/databend","slug":"timeout-no-error-received","errorCode":null,"errorMessage":"timeout; no error received","messagePattern":"timeout; no error received","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/binaries/meta/entry.rs","lineNumber":386,"sourceCode":"                    \"Error while registering node: {}, sleep {:?} and retry\",\n                    e, sleep_time\n                );\n                println!(\"    Error: {}\", e);\n                println!(\"    Sleep {:?} and retry\", sleep_time);\n                println!();\n\n                last_err = Some(e);\n                sleep(sleep_time).await;\n                sleep_time = std::cmp::min(sleep_time * 2, Duration::from_secs(5));\n            }\n        }\n    }\n\n    if let Some(e) = last_err {\n        return Err(e);\n    }\n\n    Err(anyhow::anyhow!(\"timeout; no error received\"))\n}\n\nfn run_cmd(conf: &MetaConfig) -> bool {\n    if conf.cmd.is_empty() {\n        return false;\n    }\n\n    match conf.cmd.as_str() {\n        \"ver\" => {\n            println!(\"version: {}\", DATABEND_SEMVER.deref());\n            println!(\n                \"min-compatible-client-version: {}\",\n                *MIN_QUERY_VER_FOR_METASRV\n            );\n            println!(\"data-version: {:?}\", DATA_VERSION);\n        }\n        \"show-config\" => {\n            println!(","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/binaries/meta/entry.rs#L368-L404","documentation":"register_node retries a registration operation in a loop, keeping the last concrete error in last_err. If the retry budget expires without ever capturing an error (all attempts timed out at a layer that swallowed the error, e.g. awaiting a response future that hit its own timeout returning None), the function returns this generic timeout error. It means registration did not complete within the allowed window and no more specific cause is available.","triggerScenarios":"All registration attempts exhaust the retry loop with the inner operation timing out (or returning Ok(None)-style outcomes that don't set last_err), reaching the fallthrough Err at the end of the function.","commonSituations":"Registering a node into a cluster whose raft leader is unreachable/slow (network partition, overloaded leader); misconfigured raft listen addresses; long elections leaving the client to time out repeatedly.","solutions":["Verify network reachability and the leader's raft gRPC endpoint from the registering node (nc/curl the raft addr).","Check the leader's logs for election activity or overload; wait for a stable leader before registering.","Increase the registration retry/timeout window if the cluster is legitimately slow to converge.","If timeouts are silent (last_err never set), add instrumentation/timeouts that record the concrete per-attempt error so the message is actionable."],"exampleFix":"// before\nErr(anyhow::anyhow!(\"timeout; no error received\"))\n// after\nErr(anyhow::anyhow!(\n    \"timeout registering node after {} attempts within {:?}; last_err={:?}\",\n    attempts, elapsed, last_err\n))","handlingStrategy":"retry","validationCode":"// Shell: confirm the raft endpoint answers before registering\ntimeout 5 bash -c \"</dev/tcp/<leader_host>/<raft_port>\" || echo 'leader unreachable'","typeGuard":null,"tryCatchPattern":"match register_node(...).await {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"timeout\") => {\n        // back off and retry once the leader is stable\n        tokio::time::sleep(Duration::from_secs(10)).await;\n        return register_node(...).await;\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Verify raft endpoints/DNS between the registering node and leader first","Wait for a stable elected leader before node registration","Instrument per-attempt errors so timeouts carry an actionable cause"],"tags":["rust","raft","timeout","meta-service"],"backgroundTag":"request-timeout","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}