Read the shape of the line before the words
The message looks like this:
Failed to start: main: failed to load config files: [base] > infra/conf: failed to build DNS: lookup example.com on 8.8.8.8:53: i/o timeout
Two parts of that line carry all the diagnostic value. lookup and i/o timeout come from Go's standard resolver, not from the proxy protocol. And whatever follows on tells you which resolver was asked. Some builds phrase the same failure as dns: failed to resolve followed by the lookup detail; it is the same event at the same layer, so the reading below applies unchanged.
| Form | What asked | Where to look |
|---|---|---|
lookup host on 8.8.8.8:53 | A resolver named in the config | The dns section, and whether that address is reachable at all |
lookup host: i/o timeout with no on | The system resolver | /etc/resolv.conf, systemd-resolved, the container's DNS |
lookup host on 127.0.0.53:53 | The systemd stub listener | Whether systemd-resolved is actually running |
no such host | Reached a resolver, got an answer | Different problem: the name does not exist, the resolver worked |
That last row is the one people skip. i/o timeout means the packet went out and nothing came back. no such host means an answer came back and the name was not there. The first is a reachability failure, the second is a name failure, and mixing them sends you to the wrong layer entirely.
The resolver that can only be reached through the proxy
This is the most common cause of a startup-time timeout in v2rayN, and it looks like a broken network when it is actually a circular dependency.
Suppose the configuration sends DNS queries through a proxy outbound, because you want names resolved at the exit rather than locally. That is a reasonable design. But at startup, the core must resolve the proxy server's own hostname to open the first connection. If the resolver for that first query is the same proxy outbound, the core is waiting for a tunnel that cannot be built until the tunnel exists. The result is a timeout, and it arrives before any node is tested.
The tell is that it fails at load or at first connect, consistently, and works if you replace the proxy server's hostname with its IP address. That single substitution is the fastest test in this article.
- If using the IP makes it start, the cause is the dependency, not the resolver being down.
- If it still times out with an IP, the resolver address itself is unreachable from this host.
The structural fix is to keep a direct resolver for bootstrap names and route everything else through the proxy. Xray calls the routing decision domainStrategy; setting it so that outbound hostnames are resolved locally rather than at the exit removes the loop for the bootstrap case. Whichever knob your config uses, the principle is the same: something must be resolvable without the tunnel, or nothing starts.
Resolver chains that break quietly
systemd-resolved and the 127.0.0.53 stub
On most current distributions /etc/resolv.conf points at 127.0.0.53, a stub listener owned by systemd-resolved. If that service is stopped, masked, or not running in a container, the address exists in the file but nothing listens on it. Every query times out at the same second, which reads like a network outage.
resolvectl status
If this prints the upstream servers and the current link, the stub is alive. If it reports that the service is not running, you have found the cause and no proxy configuration change will help. Point /etc/resolv.conf at a reachable server, or start the service.
Containers inherit whatever the runtime decided
A container gets a resolver chosen by the runtime, often the host's stub address, which is not reachable from inside the container's network namespace. The file looks correct and every lookup fails. Running with host networking sidesteps it; otherwise set the resolver explicitly in the container's configuration rather than trusting the inherited file.
WSL and dual-stack hosts
On WSL the resolver is generated from the Windows side, and it changes when the virtual adapter is recreated. A configuration that worked yesterday can fail today because the generated file now names an address that no longer exists. The same applies to hosts that switch between Wi-Fi and Ethernet: the resolver follows the interface.
When UDP 53 is simply blocked
Networks that block outbound UDP 53 — hotel, campus, some corporate networks, a few ISPs — break plain DNS while leaving HTTPS untouched. The symptom is uniform: every resolver times out, TCP connections to port 443 work, and the browser seems fine because the system already had cached answers.
The test is one command against a known server, bypassing the local configuration:
dig +time=3 +tries=1 @1.1.1.1 example.com
If that times out while curl -I https://1.1.1.1 succeeds, UDP 53 is filtered. The fix is DNS over HTTPS or DNS over TLS, both carried on TCP 443 or 853 and therefore unaffected by the filter. In Xray-family cores that means an HTTPS-type DNS server entry; the resolver URL is the only thing that changes, and the rest of the configuration stays as it was.
Filtered DNS is often mistaken for a general DNS failure. If the same host resolves through the proxy and not through the system, the difference is the path, not the name — that split is worth separating before editing configuration.
Which resolver wins in v2rayN
There are two layers and they are easy to confuse. The application has its own settings for what it hands the core, and the core has its own dns section that decides how names are resolved during operation. The core's section is what appears in the failure message, because the message is emitted by the core.
So when you see a timeout and you have just changed something in the v2rayN interface, check whether that change reached the generated configuration. Open the generated config and look for the dns block. If the resolver in the error is not the one you set in the interface, the interface value is being overridden, and editing it again will not change the outcome.
A practical order that avoids this confusion:
- Replace the proxy server's hostname with an IP. If that starts it, you have a bootstrap dependency, not a resolver problem.
- Run the
digtest against a public resolver. If it times out, the network blocks UDP 53. - Run
resolvectl statusor read/etc/resolv.conf. If the named server is a stub with nothing behind it, the chain is broken locally. - Only then edit the core's
dnssection, and confirm the change appears in the generated config before restarting.
What a timeout does not tell you
It does not tell you the node is down. A DNS timeout happens before the node is contacted; the core never opened a connection to the server. Reports that read "node is dead, DNS i/o timeout" are describing two unrelated facts, and the second one prevented the first from being tested.
It also does not tell you the subscription is bad. Subscription content is parsed after the core loads, and a config that fails to load never reaches the parsing stage. If the log stops at the DNS error, the subscription was never read.
And it does not tell you the proxy port is wrong. The core does not bind its listener until the configuration loads successfully, so a port conflict cannot appear in a log that stops earlier. Chasing the port from this message is time spent on a different failure.
The four facts worth recording
- The full error line, including everything after
on— that is the resolver that failed. - Whether replacing the proxy hostname with an IP changes anything. One bit, and it splits the cause in half.
- The output of
dig +time=3 +tries=1 @1.1.1.1 example.com, and separately whether HTTPS to a public address works. - The
dnsblock from the generated configuration, not from the interface.
Those four answers identify the layer. Everything after that is a known fix for a known layer, and none of it requires guessing.
Frequently asked
Is i/o timeout the same as the node being unreachable?
No. A DNS i/o timeout happens before any connection to the proxy server is attempted, so the node has not been tested. The core is stuck at configuration load, which is earlier than the stage where node health matters.
Why does it work after I replace the hostname with an IP?
Because the resolver you configured is only reachable through the tunnel, and the tunnel needs that first lookup to start. Using an IP removes the lookup. The proper fix is to keep one resolver that works without the proxy for bootstrap names.
I set DNS in the v2rayN interface but the error names a different server. Why?
The core's own dns section decides runtime resolution, and it can override what the interface supplied. Open the generated configuration and check the dns block. If the address in the error is not in that block, the interface value is being replaced somewhere else.
Does this error affect the Chinese site's guides too?
The mechanism is client-independent: any Xray-family core emits the same Go resolver error. The page you are reading is the English write-up; the same diagnosis applies to any client embedding these cores.
Can I just disable DNS in the configuration?
Removing the dns section makes the core fall back to the system resolver, which moves the failure rather than fixing it if the system resolver is the broken part. Test the system resolver first with dig, then decide.