louislam/uptime-kuma · error · Error

None of the configured resolver servers could be resolved to

Error message

None of the configured resolver servers could be resolved to an IP address. Please provide a comma-separated list of valid resolver hostnames or IP addresses.

What it means

Thrown by DnsMonitorType.resolveDnsResolverServers when every supplied resolver entry either failed DNS resolution (both A and AAAA returned no records) or was logged as invalid. IP literals are always kept, so this error implies no entry was an IP and no hostname resolved.

Source

Thrown at server/monitor-types/dns.js:159

                ...(v4.status === "fulfilled" ? v4.value : []),
                ...(v6.status === "fulfilled" ? v6.value : []),
            ];

            if (!addrs.length) {
                log.error("DNS", `Invalid resolver server ${e}`);
            }
            return addrs;
        });

        // [[ips of hostname1],[ips hostname2],...]
        const ips = await Promise.all(promises);
        // Append all the ips in [[]] to a single []
        const parsed = ips.flat();

        // only the resolver resolution can discard an address
        // -> no special error message for only the net.isIP case is necessary
        if (!parsed.length) {
            throw new Error(
                "None of the configured resolver servers could be resolved to an IP address. Please provide a comma-separated list of valid resolver hostnames or IP addresses."
            );
        }
        return parsed;
    }

    /**
     * Resolves a given record using the specified DNS server
     * @param {string} hostname The hostname of the record to lookup
     * @param {string[]} resolverServer Array of DNS server IP addresses to use
     * @param {string} resolverPort Port the DNS server is listening on
     * @param {string} rrtype The type of record to request
     * @returns {Promise<(string[] | object[] | object)>} DNS response
     */
    async dnsResolve(hostname, resolverServer, resolverPort, rrtype) {
        const resolver = new Resolver();
        resolver.setServers(resolverServer.map((server) => `[${server}]:${resolverPort}`));
        if (rrtype === "PTR") {

View on GitHub (pinned to 6b5ea01557)

Solutions

  1. Include at least one IP literal (e.g. "1.1.1.1") as a fallback alongside hostnames.
  2. Verify each hostname resolves from the Uptime-Kuma host: `nslookup adguard.local`.
  3. For container hostnames, ensure Uptime-Kuma runs on the same Docker network or the name is in /etc/hosts.

Example fix

// before
{ type: "dns", dnsResolveServer: "adguard.local" }
// after
{ type: "dns", dnsResolveServer: "adguard.local,1.1.1.1" }
Defensive patterns

Strategy: fallback

Validate before calling

function resilientResolvers(raw) {
  const list = String(raw || "").replace(/\s/g, "").split(",").filter(Boolean);
  const hasIpLiteral = list.some(net.isIP);
  return hasIpLiteral ? list : [...list, "1.1.1.1"];
}

Type guard

function hasAtLeastOneIpLiteral(list) {
  return list.some(s => net.isIP(s) > 0);
}

Try / catch

try {
  await dnsMonitor.monitor(...);
} catch (e) {
  if (/None of the configured resolver servers/.test(e.message)) {
    monitor.dnsResolveServer = "1.1.1.1";
    return retry();
  }
  throw e;
}

Prevention

When it happens

Trigger: Run a DNS monitor whose dnsResolveServer lists only unreachable or non-existent hostnames (e.g. "adguard.local" on a network where that name does not resolve, or a typo like "one.one.one.on"). The Promise.allSettled for resolve4/resolve6 both reject for each hostname.

Common situations: Docker container hostname (adguard, pihole) referenced before the container network is up; DNS-over-HTTPS hostname that no longer resolves; transient network outage at monitor runtime; typo in the resolver hostname.

Related errors


AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12). Data as JSON: /api/errors/d42f94775317e1c8. Report an issue: GitHub.