louislam/uptime-kuma · error · Error
Unable to resolve Steam server hostname "${hostname}": ${err
Error message
Unable to resolve Steam server hostname "${hostname}": ${error.message} What it means
Thrown from the catch block of resolveSteamHostname() when the underlying dns.lookup call rejects. The original error (ENOTFOUND, EAI_AGAIN, EAI_NONAME, etc.) is captured and re-thrown as a descriptive wrapper so the heartbeat message shows which hostname failed and why.
Source
Thrown at server/monitor-types/steam.js:127
*/
async resolveSteamHostname(hostname) {
if (net.isIP(hostname)) {
return hostname;
}
try {
const lookupResult = await this.lookup(hostname, { all: true });
const addresses = Array.isArray(lookupResult) ? lookupResult : [lookupResult];
const ipv4Address = addresses.find(({ address }) => net.isIP(address) === 4);
const resolvedAddress = ipv4Address?.address || addresses[0]?.address;
if (!resolvedAddress) {
throw new Error("DNS lookup returned no addresses");
}
return resolvedAddress;
} catch (error) {
throw new Error(`Unable to resolve Steam server hostname "${hostname}": ${error.message}`);
}
}
}
module.exports = {
SteamMonitorType,
};
View on GitHub (pinned to 6b5ea01557)
Solutions
- Run nslookup/dig for the hostname from the Uptime-Kuma host to reproduce the resolver error.
- Fix typos and confirm the hostname is correct and publicly resolvable.
- If internal DNS is required, configure the host resolver or /etc/resolv.conf accordingly.
- Use the server's IP address directly to eliminate DNS as a variable, then investigate the hostname separately.
Defensive patterns
Strategy: try-catch
Validate before calling
// Cheap pre-check that the hostname is plausible before delegating to dns.lookup.
function isValidHostname(h) { return typeof h === "string" && h.length > 0 && h.length <= 253 && /^[A-Za-z0-9.:-]+$/.test(h); } Type guard
function isResolvableHost(h) { return !net.isIP(h) && isValidHostname(h); } Try / catch
try { return await this.lookup(hostname, { all: true }); }
catch (e) { throw new Error(`Unable to resolve Steam server hostname "${hostname}": ${e.message}`, { cause: e }); } Prevention
- Run dig/nslookup on the host before relying on the monitor.
- Configure /etc/resolv.conf to a reachable resolver.
- Fall back to a literal IP when DNS is flaky.
When it happens
Trigger: Produced when node:dns/promises lookup() throws — hostname does not exist (ENOTFOUND), DNS server timed out (EAI_AGAIN), resolver misconfigured, network down, or a transient resolver failure. Also wraps the 'No addresses' guard from the try-block when the inner throw propagates to the catch.
Common situations: Typo in the Steam server hostname; hostname only resolvable on an internal DNS the Uptime-Kuma host cannot reach; DNS server temporarily unreachable; the hostname was retired; the underlying lookup error 126 ('DNS lookup returned no addresses') is also re-wrapped here because the inner throw is caught.
Related errors
- DNS lookup returned no addresses
- None of the configured resolver servers could be resolved to
- domain_expiry_unsupported_is_icann
- domain_expiry_unsupported_unsupported_tld_no_rdap_endpoint
- No Resolver Servers specified. Please specify at least one r
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/66d8efadb3a7765a.
Report an issue: GitHub.