{"record":{"id":"40f2ad303d60dd1d","repo":"xai-org/x-algorithm","slug":"notfound","errorCode":"NotFound","errorMessage":"DNS resolution returned 0 addresses for {}","messagePattern":"DNS resolution returned 0 addresses for (.+?)","errorType":"error_code","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"phoenix/crates/serving/xai-recsys-engine/src/checkpoint_proxy.rs","lineNumber":106,"sourceCode":"\n    async fn resolve_and_connect(&self) -> Result<Vec<transport::Channel>, io::Error> {\n        let (scheme, hostport) = if let Some(rest) = self.copy_url.strip_prefix(\"https://\") {\n            (\"https\", rest)\n        } else {\n            (\"http\", self.copy_url.trim_start_matches(\"http://\"))\n        };\n        let tls = crate::tls::ClientTlsOptions::from_env()?;\n        let (name, port) = hostport.rsplit_once(':').ok_or_else(|| {\n            io::Error::new(\n                io::ErrorKind::InvalidInput,\n                format!(\"copy_url must be host:port, got {}\", self.copy_url),\n            )\n        })?;\n\n        let addrs: Vec<SocketAddr> = format!(\"{}:{}\", name, port).to_socket_addrs()?.collect();\n\n        if addrs.is_empty() {\n            return Err(io::Error::new(\n                io::ErrorKind::NotFound,\n                format!(\"DNS resolution returned 0 addresses for {}\", name),\n            ));\n        }\n\n        let dns_count = addrs.len();\n\n        let connect_timeout = std::time::Duration::from_secs(\n            std::env::var(\"COPY_PORT_CONNECT_TIMEOUT_SECS\")\n                .ok()\n                .and_then(|s| s.parse().ok())\n                .unwrap_or(10),\n        );\n\n        let request_timeout = self.request_timeout;\n\n        let mut endpoints = Vec::with_capacity(addrs.len());\n        for addr in &addrs {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/crates/serving/xai-recsys-engine/src/checkpoint_proxy.rs#L88-L124","documentation":"After parsing host:port from copy_url, DNS resolution (to_socket_addrs) succeeded structurally but returned zero addresses. The proxy then returns NotFound because it has nothing to dial.","triggerScenarios":"to_socket_addrs returning an empty iterator for the configured trainer host — rare but possible with resolver quirks, an empty hosts-file entry, or a name resolving to zero A/AAAA records.","commonSituations":"DNS misconfiguration, stale /etc/hosts entry, IPv6-only name with IPv6 disabled, or transient resolver behavior in the cluster.","solutions":["Verify the hostname resolves: 'getent hosts <name>' or 'dig <name>' from the same pod","Fix the DNS record or /etc/hosts entry to point at the trainer","If transient, retry; but prefer correcting resolution since it usually recurs"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"use std::net::ToSocketAddrs;\nlet n = (host, port).to_socket_addrs()?.count();\nif n == 0 { /* re-resolve or abort with clear message */ }","typeGuard":null,"tryCatchPattern":"Catch io::ErrorKind::NotFound around resolve_and_connect and retry DNS a bounded number of times with backoff.","preventionTips":["Preflight DNS resolution in readiness probes","Use stable service names rather than pod IPs"],"tags":["dns","network","checkpoint-proxy"],"backgroundTag":"dns-resolution-empty","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}