{"record":{"id":"a891ca9118f748d5","repo":"linera-io/linera-protocol","slug":"preflight-failed-for","errorCode":null,"errorMessage":"preflight failed for {}: {:?}","messagePattern":"preflight failed for (.+?): (.+?)","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"linera-service/src/cli/validator_benchmark/mod.rs","lineNumber":87,"sourceCode":"                    ended_at: None,\n                    duration_secs: None,\n                },\n                config: serde_json::to_value(self)?,\n                chains_tested: self.chain.iter().map(|c| c.to_string()).collect(),\n                complete: false,\n            },\n            layers: Layers::default(),\n        };\n\n        // L1 preflight also yields version/network info for the report metadata.\n        // When skipped, fetch those two cheap fields best-effort anyway.\n        if !self.skip_preflight {\n            let outcome = preflight::run(&node, rpc_timeout, &progress).await;\n            if self.abort_on_preflight_fail\n                && outcome.report.status == report::PreflightStatus::Fail\n            {\n                progress.clear();\n                anyhow::bail!(\n                    \"preflight failed for {}: {:?}\",\n                    self.address,\n                    outcome.report.errors\n                );\n            }\n            report.metadata.candidate.version_info = outcome.version_info;\n            report.metadata.candidate.network_description = outcome.network_description;\n            report.layers.preflight = Some(outcome.report);\n        } else {\n            report.metadata.candidate.version_info =\n                rpc::timed(rpc_timeout, node.get_version_info())\n                    .await\n                    .ok()\n                    .map(|v| format!(\"{v:?}\"));\n            report.metadata.candidate.network_description =\n                rpc::timed(rpc_timeout, node.get_network_description())\n                    .await\n                    .ok()","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/validator_benchmark/mod.rs#L69-L105","documentation":"Before measuring, the validator benchmark runs a preflight against the candidate node (connectivity/version probes). If the preflight report's status is `PreflightStatus::Fail` and `--abort-on-preflight-fail` is enabled, the run aborts and embeds the preflight error list, so you can fix the node before wasting a benchmark. The successful version_info from preflight is also recorded in the report metadata.","triggerScenarios":"Running `linera validator benchmark` against a node whose prelight checks fail — unreachable endpoints, version mismatch, failing probes — while `abort_on_preflight_fail` is set (and `skip_preflight` is not).","commonSituations":"Benchmarking a validator that is still starting up; pointing at the wrong port; version skew between the benchmarking client and the candidate node.","solutions":["Read the errors inside the bail message — they come from the preflight report and name the failing checks","Fix the candidate node (correct address, healthy gRPC, compatible version) and re-run","Pass --skip-preflight to bypass the checks entirely for exploratory runs","If you intentionally benchmark a degraded node, disable --abort-on-preflight-fail so the run continues"],"exampleFix":"# before\nlinera validator benchmark 127.0.0.1:9100 --chain <id> --abort-on-preflight-fail\n\n# after (skip the checks for an exploratory run)\nlinera validator benchmark 127.0.0.1:9100 --chain <id> --skip-preflight","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match benchmark::run(&opts).await {\n    Err(e) if e.to_string().starts_with(\"preflight failed\") => {\n        // node is unhealthy; either fix it or re-run with --skip-preflight\n        // when the measurement is still meaningful on a degraded node\n        eprintln!(\"preflight failed; fix the node or pass --skip-preflight\");\n    }\n    result => result?,\n}","preventionTips":["Smoke-test the target node (version query, health check) before launching the benchmark","Keep --skip-preflight out of measurement runs — it exists for exploratory probing only","Treat the embedded error list as the action plan: fix those checks and the abort disappears"],"tags":["validator-benchmark","preflight","linera-cli"],"backgroundTag":"preflight-check-failed","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}