Clash DNS Resolution Warnings Explained | Generated by AI

Home 2025.12

Question: Why are there so many of these Clash logs: “[TCP] dial DIRECT (match DomainSuffix/local) 127.0.0.1:… –> lzwjava.local:59822 error: couldn’t find ip”?

Answer:

These warning logs in Clash (likely Clash for Windows or a similar client like Clash Verge) indicate repeated failed attempts to resolve and connect to the hostname lzwjava.local on port 59822.

Key Breakdown of the Log

Why This Happens

Why So Many Logs

How to Fix or Reduce Logs

  1. Add Host Mapping (Quick Fix):
    • Edit your system’s hosts file:
      • Windows: C:\Windows\System32\drivers\etc\hosts
      • macOS/Linux: /etc/hosts
    • Add: 127.0.0.1 lzwjava.local (or the actual IP if it’s another device).
    • This bypasses DNS lookup.
  2. Change Clash Rules:
    • Remove or modify the DOMAIN-SUFFIX,.local,DIRECT rule to avoid DIRECT routing for unresolved hosts.
    • Or add a specific rule like DOMAIN,lzwjava.local,REJECT to block it silently.
  3. Disable the Feature in the Application:
    • If it’s JetBrains IDE (e.g., IntelliJ), check settings for “Remote Development” or “Gateway” connections and disable/disconnect from the server named “lzwjava”.
  4. Enable Enhanced DNS in Clash (if using Fake-IP or TUN mode):
    • Some versions handle local resolutions better with proper DNS settings, but mDNS support is limited.

These logs are harmless warnings (not errors crashing Clash), but they spam if the app keeps retrying. Fixing the resolution or stopping the connection attempts will eliminate them.

References:


Back

x-ai/grok-4.1-fast

Donate