tinyhumansai/openhuman · error
DNS resolution task failed for '{log_host}': {e}
Error message
DNS resolution task failed for '{log_host}': {e} What it means
url_guard resolves DNS on a spawn_blocking thread; this fires when the JoinHandle itself fails — the blocking task panicked or was cancelled — as distinct from a resolver failure. It aborts SSRF validation before any request is issued.
Source
Thrown at src/openhuman/tools/impl/network/url_guard.rs:163
Ok(url)
}
async fn resolve_host_ips(host: String, port: u16) -> anyhow::Result<Vec<IpAddr>> {
let log_host = host.clone();
tokio::task::spawn_blocking(move || {
(host.as_str(), port)
.to_socket_addrs()
.map_err(|e| {
log::debug!("[url_guard] DNS resolution failed host={host} port={port} error={e}");
anyhow::anyhow!("DNS resolution failed for '{host}': {e}")
})
.map(|iter| iter.map(|addr| addr.ip()).collect())
})
.await
.map_err(|e| {
log::debug!("[url_guard] DNS resolution task failed host={log_host} port={port} error={e}");
anyhow::anyhow!("DNS resolution task failed for '{log_host}': {e}")
})?
}
pub(super) fn normalize_allowed_domains(domains: Vec<String>) -> Vec<String> {
if domains.is_empty() {
return Vec::new();
}
let mut normalized = domains
.into_iter()
.filter_map(|d| normalize_domain(&d))
.collect::<Vec<_>>();
normalized.sort_unstable();
normalized.dedup();
if normalized.is_empty() {
// All entries were malformed (whitespace-only, scheme-only, etc.) and
// filtered out. Returning empty would silently enter open mode; instead
// return a sentinel that keeps the tool in strict mode and rejects every
// URL — fail-closed on misconfiguration. (#2738)View on GitHub (pinned to 7491200858)
Solutions
- Treat as transient infrastructure failure and retry the request
- If persistent, investigate the panic in the blocking resolver path
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/tools/impl/network/url_guard.rs:163 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- DNS resolution errors: ENOTFOUND and getaddrinfo failures — how hostname lookups fail and how to debug them.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/86c899e5a14d5a3e.
Report an issue: GitHub.