Connectivity Troubleshooting · Clash Technical Blog

How to fix a port conflict in Clash Verge Rev

When Clash Verge Rev reports address already in use or mixed-port fails to start, identify the listener first, then distinguish a leftover core from another program or a reserved port. Follow these steps to diagnose, repair, roll back, and verify the fix.

  • Clash Verge Rev
  • address already in use
  • mixed-port
  • Port conflict
  • Service mode
On this page

First confirm that the log shows a port binding conflict

This guide applies only when the log explicitly shows address already in use, Bind failed, or Start Mixed(http+socks) server error. The 7890 and 1053 values in the issue reports are examples; use the mixed-port, DNS, or external-controller port from your own log while troubleshooting.

The Mihomo documentation describes mixed-port as the local inbound that accepts both HTTP(S) and SOCKS requests. If the new core cannot bind to it, the system proxy will not get a working new connection even if it still points to that port.

Clash Verge Rev issue #7861 documents verge-mihomo running as root continuing to hold the mixed-port and DNS ports after the GUI exits abnormally under Service Mode on macOS. Issue #6741 documents the old and new cores competing for mixed-port after logging back in on Linux.

Both remain open issues. Their root-cause analyses come from the reporters and should not be presented as a general conclusion confirmed by the maintainers.

Record the actual port from the first bind error
Start Mixed(http+socks) server error: listen tcp :7890: bind: address already in use
Start DNS server(TCP) error: listen tcp 0.0.0.0:1053: bind: address already in use
Start DNS server(UDP) error: listen udp 0.0.0.0:1053: bind: address already in use

Branch from the first error

Log or symptomMore likely directionNext step
Only mixed-port reports address already in useAn old client, another program, a leftover core, or a Windows reserved portIdentify the actual listener
Both mixed-port and the DNS port failAnother core is more likely to be holding the whole port setCheck the process owner and start time
Only the external-controller port conflictsThe control interface or Dashboard is using the same portCheck the controller port separately
The log shows only connection refused, with no bind errorNothing is listening on the destination port; the port is not occupiedTroubleshoot core startup and configuration
Only one website fails to openA rules, DNS, or node problemDo not terminate a process using this guide

Restore a direct connection before troubleshooting

First turn off TUN and the system proxy, confirm that the device can connect without Clash Verge Rev, and then exit the client completely from the tray. Save the current Profile, port settings, and failure log; do not refresh subscriptions or change rules while isolating the problem.

After exiting, wait a few seconds and check the port again. If the listener has disappeared, start the client only once and observe it. Continue identifying the owner only if the port remains occupied.

Before troubleshooting

  1. Record the actual ports

    From the first bind error, record the exact mixed-port, DNS, or external-controller port.

  2. Restore basic connectivity

    Turn off TUN and the system proxy, then confirm that the device can still connect directly while the client is stopped.

  3. Exit the client normally

    Exit completely from the tray first and wait a few seconds; do not immediately force-quit the process.

  4. Save the configuration and logs

    Keep the current Profile, port values, and first error. Redact the subscription URL, passwords, and secret before posting them publicly.

Identify the listener on your operating system

A port conflict is not a process-name guessing game. Find the PID first, then check the process name, owner, start time, and executable path so you can distinguish the active core from a leftover old core or an unrelated program.

The 7890, 1053, and 12345 values below are examples. Replace them with the ports from your log and the PID you just identified before running anything. If a read-only query returns no result, do not terminate random processes just to produce one.

Windows PowerShell: query TCP and UDP listeners
$Port = 7890
$Tcp = Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue
$Tcp | Select-Object LocalAddress, LocalPort, OwningProcess
$Tcp | ForEach-Object {
  Get-Process -Id $_.OwningProcess | Select-Object Id, ProcessName, Path
}
Get-NetUDPEndpoint -LocalPort 1053 -ErrorAction SilentlyContinue |
  Select-Object LocalAddress, LocalPort, OwningProcess
macOS: query listeners and inspect the process
PORT=7890
sudo lsof -nP -iTCP:${PORT} -sTCP:LISTEN
sudo lsof -nP -iUDP:1053
ps -o user,pid,ppid,lstart,command -p 12345
Linux: query listeners and inspect the process
sudo ss -ltnp 'sport = :7890'
sudo ss -lunp 'sport = :1053'
ps -o user,pid,ppid,lstart,cmd -p 12345

Choose the smallest fix for the identified listener

The port belongs to another Clash client, VPN, development server, or local proxy

Exit that application normally from its own interface, or configure the two programs to use different ports. Do not stop an unknown system process.

Clash Verge Rev has exited, but the port still belongs to verge-mihomo

This is consistent with a leftover core. Save its PID and owner, then send a normal termination request to that PID only.

The process belongs to root or an administrator and reappears immediately after being stopped

Do not repeatedly force-kill it; move to the client's Service Mode repair or reinstall workflow.

A conflict appears intermittently after logging in again or rapidly restarting the client

This may be a handoff race between the old and new cores. Disable duplicate autostart entries first, then launch the client only once to verify.

Windows shows no listener, but the port still cannot be bound

Check whether the port falls within a Windows excluded port range.

Terminate a single process only after confirming that its PID belongs to a leftover verge-mihomo from an exited client. Start with a normal termination request and query the port again; do not begin with a broad pkill command or a force signal.

macOS / Linux: terminate only the single confirmed PID
# 把 12345 换成刚才确认的 PID
sudo kill -TERM 12345
Windows PowerShell: terminate a single PID after confirmation
# 把 12345 换成刚才确认的 PID
Stop-Process -Id 12345 -Confirm

On Windows, check reserved ports when no listener appears

In the Windows report in issue #6947, changing the port and restarting the system proxy restored connectivity. A project collaborator also recommended checking the Mihomo log for Bind failed and inspecting the Windows or Hyper-V reserved ports. Follow this branch only when no listening process appears but the log still clearly reports a bind failure.

If the current mixed-port falls inside a reserved range, choose a new port in Clash Verge Rev that has no listener and is outside the reserved range, then return to the home screen and enable the system proxy again. Changing only the port without identifying its owner will not resolve a leftover core that is still running.

View Windows TCP and UDP reserved ports (read-only)
netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv4 show excludedportrange protocol=udp
netsh interface ipv6 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=udp
Confirm that a candidate port has no listener before using it
# 17890 只是示例,不能保证每台电脑都可用
Get-NetTCPConnection -LocalPort 17890 -ErrorAction SilentlyContinue
Get-NetUDPEndpoint -LocalPort 17890 -ErrorAction SilentlyContinue

Repair Service Mode if a leftover core keeps returning

The Clash Verge Rev v2.5.2 source provides service install, uninstall, reinstall, and repair commands. The repair path performs a forced reinstall and waits for service IPC to recover. Button labels can differ by operating system and build, so use the Service Mode controls in your current client settings rather than deleting service files manually.

The v2.5.2 release notes mention more robust service lifecycle management, but that does not prove the stable release completely fixes the leftover-core and port-race reports filed afterward. This guide is a recovery path, not a release fix announcement.

Service Mode recovery sequence

  1. Keep a direct connection available

    Turn off the system proxy and TUN, then confirm that the system can still connect while the client is stopped.

  2. Save the diagnostic results

    Record the port, PID, process owner, client version, and first bind error.

  3. Use the controls in the client

    Uninstall, repair, or reinstall the service from the Service Mode settings, then wait for the permission prompt and operation to complete.

  4. Restart the system if necessary

    If an administrator-level core still holds the port, restart the system, confirm the port has been released, and only then launch the client.

  5. Restore one feature at a time

    Start with the original Profile and system proxy. Once those work, restore TUN only if needed.

Verify the port, proxy, and port release after exit

Confirm that the target port is free before launch, then start Clash Verge Rev and check that only one expected core is listening. Next, replace the example port with the current mixed-port, make a real HTTPS request through the local proxy, and verify the entry in Connections.

Enable TUN only after the system proxy path has passed verification. If the connection fails only when TUN is enabled and the log contains no bind error, switch to troubleshooting TUN, DNS, and routing instead of continuing to change mixed-port.

Verify a real request through the current mixed-port
# 把 7890 换成当前 mixed-port
curl -I -x http://127.0.0.1:7890 https://example.com

Completion criteria

  • No unknown listener occupies the target port before startup
  • After startup, only one expected verge-mihomo listens on mixed-port
  • The new log no longer shows address already in use or Bind failed
  • A curl request through mixed-port receives an HTTP response
  • The system proxy points to the current actual port, and Connections shows the test request
  • The port is released after a normal client exit, and the system proxy can be restored
  • No second leftover core appears after another launch or login

Roll back on failure and submit useful evidence

If changing the port or reinstalling the service makes the problem worse, turn off the system proxy and TUN so the device stays on a direct connection. Restore the original port only after it has been released. If service reinstallation fails, keep Service Mode disabled and do not continue deleting system files manually.

When reporting the problem upstream, describe your local conclusion as an observation instead of declaring a root cause on the maintainers' behalf. Do not upload a complete configuration, subscription URL, node password, controller secret, or unredacted log.

Keep this evidence before filing an official issue

  • Full Clash Verge Rev version and installation source
  • Operating system version and CPU architecture
  • Whether Service Mode, TUN, and launch at startup are enabled
  • Whether the GUI exited normally, crashed, or was force-quit
  • The first address already in use log entry and actual port
  • The listener's PID, owner, start time, and executable path
  • Whether the port is released after exiting and whether the problem returns after service repair

References