Clash Runtime Logs Explained: dial tcp, i/o timeout, and DNS Errors
Learn what log levels and common errors mean. Trace dial tcp failures, i/o timeouts, no such host, and rule matches to nodes, DNS, or config issues.
Set the log level and reproduce the request
Start by checking the core runtime logs on the client’s “Logs” page. Client startup logs may only cover the interface, subscription updates, or service startup, and may not include connection details. If there’s no log-level option in the interface, set the top-level log-level field in an editable config or override, then reload and confirm it took effect. Don’t just switch the log window’s filter to debug: a filter can’t show records the core never emitted.
log-level: info
- Use
infoto see rule matches and outbound connections. Withwarningorerror, normal connection records may be filtered out. - Clear the view or note the time, then make a single request from the affected app. Record the destination domain, port, and current policy group member. Don’t run a batch of node tests at the same time; their logs may get mixed in.
- To inspect DNS or connection details, switch to
debugbriefly and try again, then restoreinfo. Before sharing logs, redact subscription URLs, credentials, controller API keys, and internal addresses.
Reading rule-match logs: destination, rule, policy group, and node
The example below uses common mihomo log fields. Prefixes and wording vary by version and client; the example domains and addresses are for illustration only.
[TCP] 127.0.0.1:53142 --> example.com:443 match DomainSuffix(example.com) using PROXY[Node A]
[TCP]identifies the protocol for this traffic record.127.0.0.1:53142is the inbound source in this example;53142is the source port, not the client’s configured listening port.example.com:443is the destination requested by the app. If proxy dialing fails, the error may end with anotherIP:portpair—that’s the address the connection attempt actually targeted at that stage.match DomainSuffix(example.com)means the domain suffix rule matched.using PROXY[Node A]means traffic is routed through the policy group namedPROXY, using Node A from that group. Seeing a policy group name doesn’t confirm which route is selected within it.
If you expect traffic to use a proxy but see DIRECT, first check whether the client is in rule, global, or direct mode. In rule mode, check rules in order; evaluation stops at the first match. If the log shows MATCH, none of the preceding rules matched that connection. Check the rules’ order in the active config and whether the core received a domain or an IP. A domain suffix rule can’t match based on an IP alone. A rule-match record also doesn’t prove the webpage returned a successful response.
dial tcp and i/o timeout: check the operation and address
dial tcp describes a TCP dial operation, not the cause of the failure. Find the address that follows, then read the final error. For example, if the app requests example.com:443 but the error points to the node at 203.0.113.10:8443, investigate the connection to the node first—not the destination website’s DNS.
| Error snippet | What to check |
|---|---|
dial tcp …:8443: connect: connection refused | The connection was explicitly refused. Check the node’s server and port, and confirm a service is listening on that port. An intermediary device may also be refusing the connection. |
dial tcp …:8443: i/o timeout | The connection wasn’t established within the time limit. Keep the destination and network unchanged, then retry with another node in the same group. If only the original node fails, check its address, port, or network path first. |
read tcp …: i/o timeout | The timeout happened during a read, not during the TCP dial itself. Check the surrounding logs to see whether it timed out while reading handshake data, waiting for a proxy response, or waiting for an upstream response. |
read udp …:53: i/o timeout | If the surrounding logs show a DNS query, first check whether a reply arrives for the UDP query sent to that resolver. The port and protocol offer clues, but a timeout alone doesn’t mean the domain doesn’t exist. |
In Windows PowerShell, use Test-NetConnection -ComputerName 203.0.113.10 -Port 8443 as a TCP comparison. Replace the example with the node address and port from your config. This applies to nodes that use TCP connections. A TcpTestSucceeded value of True only confirms that this test connection was established; it doesn’t verify proxy authentication, TLS settings, or a web request. If TUN is enabled, also check whether the test used a different route from the failing traffic.
no such host: distinguish the node domain from the destination domain
Look for the name after lookup. If it’s the node’s domain, the failure may have occurred before the proxy connection. If it’s the app’s destination, consider the matched outbound and where resolution took place. no such host usually means the lookup didn’t return a usable address; that line alone doesn’t prove the domain has been deactivated. It’s also different from a DNS response timeout.
lookup node.example.net: no such host
lookup app.example.org: no such host
Check the DNS settings mihomo actually uses
- Node domain won’t resolve: Check the node’s
serverspelling and whether the subscription is up to date, then reviewdns.proxy-server-nameserver. mihomo can use this setting specifically to resolve proxy node domains. If it’s not configured, node resolution may still be affected by the general DNS settings. - Destination domain won’t resolve: Check whether the core is resolving it locally or the error came from a remote server. For local resolution, check whether the active
dns.nameserver-policyassigns a resolver to that domain, then reviewdns.nameserver. For internal domains, use a resolver that can resolve the name. - DoH upstream is unreachable: If the error points to the DoH server’s hostname or its
443port, first check whether the DoH host can resolve and connect. mihomo’sdns.default-nameserverresolves DNS server hostnames; changing the rules for the destination domain won’t fix this step.
Use nslookup app.example.org to compare with the system’s DNS results, replacing the example with the domain that’s failing. The result only reflects the resolver path used by that command, not mihomo’s DoH or remote proxy resolution. With fake-ip enabled, an app receiving a synthetic address in the default 198.18.0.0/16 range doesn’t mean resolution failed. If the app receives an address but still times out, check the matching rule and outbound instead of testing the synthetic address as if it were the origin server.
Retest one variable at a time to isolate the issue
- Only one node fails: Keep the config, network, and destination unchanged; switch only the policy group member. Compare the actual dial address and the end of the error. If both attempts point to the same DNS upstream, investigate the shared resolution path rather than reinstalling each client.
- Only one domain fails: Keep the node and test against a known reachable destination. If only the original domain uses the wrong outbound, check the rule that matched it. If the outbound is correct but lookup fails, investigate the resolver. Don’t change
MATCHfirst; it affects all traffic that didn’t match an earlier rule. - Widespread failures after a subscription update: Check whether the reload reported a YAML parsing error or a reference to a missing policy group, and confirm the selected config actually loaded into the core. If the reload succeeded, compare node ports, policy group members, and DNS overrides before and after the update. Revert one setting at a time and retest.
After fixing the issue, retry with the same app, destination, and traffic capture method. Check three things: the expected rule matched, traffic used the correct outbound, and the app received the expected response. Faster node tests or error-free logs don’t replace that final check.