Clash Logs Explained: Common Errors and How to Troubleshoot Them

Understand Clash and mihomo log levels, diagnose dial timeouts, connection refusals and config errors, then troubleshoot subscriptions, proxies, rules and local network issues in order.

Log Levels and Line Structure

First, distinguish client logs from core logs. The GUI client may log subscription downloads, config overrides and core startup, while the core usually logs rule matches, DNS queries and outbound connections. If an update fails right after you click “Update Subscription,” check the log for that operation. If the core is running and errors occur only when you open a website, check the connection logs from that time.

  • info: A good starting point for routine troubleshooting. Use it to check listening addresses, connection targets and rule-selected routes. A missing entry doesn’t necessarily mean an action didn’t happen; the client may filter what it displays.
  • warning: Indicates an operation encountered a problem, such as a failed outbound connection. A single warning doesn’t mean the core has stopped or that every proxy is unavailable.
  • error: Check which component and action failed. Config loading, listening ports and running tasks can all produce errors, with different scopes of impact.
  • debug: Enable it briefly when the default logs aren’t enough. If the client lets you edit the active config, change the top-level log-level to debug, reload, reproduce the issue once and record the result. Then restore info.

For each connection log, start with four details: the time, source and destination, matched rule or policy group, and the error at the end. The example below shows the field order; formatting varies by core version and client:

12:04:18 level=warning [TCP] dial OUT
127.0.0.1:52134 → example.com:443
match DomainSuffix(example.com) error: i/o timeout

52134 is the source port for this example connection, not the proxy listening port; 443 is the destination port. OUT is the matched policy. If it’s a policy group, check the connection details to see which proxy was actually used. If the error ends with another dial address, that may be a proxy server or DNS resolver. Don’t assume the timeout occurred at the destination website just because example.com:443 appears earlier in the log.

Subscription Update Failures and Config Parse Errors

Check each step: fetch config → parse config → apply config. After a subscription update fails, the client may keep using the old config. If websites still load, that only shows the current config works; it doesn’t mean the subscription updated. Note when you clicked the update button, then compare the config’s last-updated time with the name of the currently selected config.

  1. Fetching the config: 401 or 403 means the server returned an authentication- or access-related error. Check that the subscription is valid and that you’re using the access method the server requires. If you get 200 but parsing still fails, check the content type and the start of the file: a login page or maintenance page can also return 200. Don’t post the full subscription URL in a public support ticket.
  2. Parsing the config: yaml: line 18: did not find expected key points to where the parser found a problem. Check the indentation, colons, quotes and list dashes on line 18 and the lines before it. If the client applies overrides or merges configs, the line number may refer to the merged file, not the original subscription.
  3. Applying the config: Valid YAML can still fail to load. If the log says a proxy group or rule reference can’t be found, check that the names match exactly. If it points to a protocol parameter, verify which core and version are actually running. The client version doesn’t tell you the core version. If you have a standalone mihomo command, run mihomo -v to check its version—but make sure it’s the same core binary the client starts.

If the log specifically reports a fetch failure for proxy-providers or rule-providers, distinguish the main config from the resources it references. Successfully loading the main config doesn’t mean remote resources have updated. Note the resource name in the error, then check its last-updated time or initialization status instead of repeatedly re-downloading the main subscription.

Dial Timeouts, Connection Refused and DNS Errors

Log excerpt What it means What to check first
dial timeout / i/o timeout A dial or other network operation timed out; the context determines which stage failed. Identify what timed out: connecting to the proxy server, connecting to the destination or querying DNS. Retry the same request through another known-working route.
connection refused The connection attempt was refused. This often means nothing is listening on that port, but a network device may also have actively rejected it. Check whether the address in the error is a local loopback address or a remote address, then verify the local listener or remote connection settings accordingly.
lookup … no such host The hostname lookup didn’t return an address for this request. First identify whether the domain in the error is a proxy server, subscription host or destination. Then check its spelling and the resolution path actually used for that query.
address already in use The core couldn’t bind to the required local address and port. Check whether another client instance is already listening. If you change the port, update the settings of any apps that use it.

Try the same destination through another proxy

In the same policy group, use the same app to access the same destination. First record the error on proxy A, then switch manually to proxy B and retry. If A repeatedly times out while B completes the request, the issue is likely with A or the route to it—but that doesn’t prove A’s server is down. If both fail, first confirm in the new logs that the switch took effect, then check the network and DNS steps they share. A built-in latency test usually checks a designated test address, not the domain that originally failed.

Check the local port

Suppose the active config uses mixed-port: 7890 and the core listens on the local loopback address. In Windows PowerShell, check the TCP port, then send a test request through an explicitly specified HTTP proxy. If your config uses another port, replace it in both commands:

Test-NetConnection -ComputerName 127.0.0.1 -Port 7890
curl.exe --proxy http://127.0.0.1:7890 --connect-timeout 5 --max-time 15 -I https://example.com/

TcpTestSucceeded : True only means the local port accepted a TCP connection. It doesn’t confirm that the expected core is listening or that the proxy route works. The second command sends a request through the specified proxy; compare the result with the core logs from the same time. The 5-second and 15-second limits in the command are for this diagnostic test, not core defaults. Even a successful request doesn’t prove that the system proxy or TUN is routing traffic from other apps.

Rule Matches and Local Traffic Routing

The connection is logged, but the route is wrong

Start by checking the active mode. Rule mode generally matches rules in the order listed; Global and Direct modes don’t select routes by evaluating this rule list. In Rule mode, check for a broad rule that matches earlier and see which member the policy group currently selects. The rule below sends the specified domain and its subdomains through the existing OUT proxy or policy group; the final MATCH handles all other requests:

rules:
  - DOMAIN-SUFFIX,example.com,OUT
  - MATCH,DIRECT

In this example, OUT must exactly match a name in the active config. After making a change, test with a new connection rather than reusing one the browser already opened. If the log shows only a destination IP, first check whether the core received the domain with the request. Moving a domain rule higher in the list can’t add a domain to a connection that only has an IP address.

There’s no matching connection in the logs

Clear any client log filters and check the timestamp. Then use the explicit proxy request above to confirm the core can receive and log connections. If that request appears in the logs but the original app doesn’t, check how its traffic is routed. The system proxy works only for apps that read the system settings. On Windows, go to Settings → Network & internet → Proxy and check the address and port under Manual proxy setup. For TUN, verify that the virtual interface is up, the traffic is covered by the routing rules, and another VPN hasn’t changed the routes. A lit toggle alone doesn’t prove traffic is being routed.

Download Clash