{"record":{"id":"192d0128f8c7ed4f","repo":"jdx/mise","slug":"github-relay-is-not-connected","errorCode":null,"errorMessage":"GitHub relay is not connected","messagePattern":"GitHub relay is not connected","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/github_relay.rs","lineNumber":900,"sourceCode":"        command: &mut tokio::process::Command,\n        socket: Option<&Path>,\n    ) -> Result<std::process::ExitStatus> {\n        let mut terminate =\n            tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?;\n        let mut hangup = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::hangup())?;\n        let heartbeat = if let Some(socket) = socket {\n            let client = Client::builder()\n                .unix_socket(socket)\n                .no_proxy()\n                .timeout(Duration::from_secs(3))\n                .build()?;\n            if !client\n                .get(\"http://localhost/_session\")\n                .send()\n                .await\n                .is_ok_and(|r| r.status() == 204)\n            {\n                bail!(\"GitHub relay is not connected\");\n            }\n            Some(client)\n        } else {\n            None\n        };\n        let disconnected = async {\n            let Some(client) = heartbeat else {\n                std::future::pending::<()>().await;\n                return;\n            };\n            let mut failures = 0;\n            loop {\n                tokio::time::sleep(Duration::from_secs(2)).await;\n                if client\n                    .get(\"http://localhost/_session\")\n                    .send()\n                    .await\n                    .is_ok_and(|r| r.status() == 204)","sourceCodeStart":882,"sourceCodeEnd":918,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/github_relay.rs#L882-L918","documentation":"wait_command probes the relay's session endpoint (GET http://localhost/_session) and expects a 204 indicating the relay subprocess has finished connecting to GitHub. If the probe fails (connection refused, timeout, or a non-204 status) it reports \"GitHub relay is not connected\" — the session cannot proceed without a healthy relay.","triggerScenarios":"Polling for relay readiness during session startup when the relay process failed to start, crashed, is still initializing past the wait window, or answered with an unexpected status.","commonSituations":"Relay binary missing/failing to spawn; localhost port conflicts; slow networks keeping the relay from completing its GitHub connection within the wait budget; firewall software blocking loopback connections.","solutions":["Retry the session — transient startup slowness is the most common cause.","Check that the relay child process is running and inspect its stderr/logs for startup errors.","Verify nothing else occupies the relay's localhost port and that a firewall isn't blocking loopback.","Check GitHub connectivity/credentials from the host — the relay only answers 204 once its upstream connection is established."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"let ready = reqwest::get(\"http://localhost/_session\")\n    .await.ok().map(|r| r.status() == 204).unwrap_or(false);\nif !ready { /* wait and re-poll before proceeding */ }","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"GitHub relay is not connected\") =>\n        wait_then_retry(startup_deadline),\n    other => other,\n}","preventionTips":["Wait for the relay health check (204 on /_session) before issuing session commands.","Monitor relay process liveness and logs during startup.","Reserve the relay's loopback port and ensure firewalls allow loopback traffic."],"tags":["network","relay","startup","healthcheck"],"backgroundTag":"connection-refused","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}