WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL2 refused to start if DNS's port has been occupied by other process

Open colinxu2020 opened this issue 8 months ago • 7 comments

Windows Version

Microsoft Windows [Version 10.0.22623.1325]

WSL Version

1.0.1.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.74.2

Distro Version

Ubuntu 22.04

Other Software

SmartDns Rust 0.8.6 running on host windows system

Repro Steps

  1. Install SmartDNS Rust Service on host windows system.(Non-Service Might Also Cause Failure, But I'm not sure)
  2. Install WSL2, and run it.
  3. Crashes!

Expected Behavior

The WSL2 Should Start Successful

Actual Behavior

Error: 0xffffffff
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0xffffffff

For Detail, please refer to Gist.

Diagnostic Logs

STrace Results: Gist

WslLogs-2025-05-10_12-05-08.zip

P.S. WSL1 works fine in my case

colinxu2020 avatar May 10 '25 04:05 colinxu2020

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
.wslconfig found
Detected appx version: 1.0.1.0
Found no WSL traces in the logs

github-actions[bot] avatar May 10 '25 04:05 github-actions[bot]

Seems the action still unhappy with that, uploading to my server: WslLogs-2025-05-10_12-05-08.zip

colinxu2020 avatar May 10 '25 04:05 colinxu2020

Failed to parse logs. Unexpected file: .wslconfig The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
Found no WSL traces in the logs

github-actions[bot] avatar May 10 '25 04:05 github-actions[bot]

Why are the actions behaviour so weired? Broswered the codes and reuploading a assets that I assume it will be happy: WslLogs-2025-05-10_12-05-08.zip

colinxu2020 avatar May 10 '25 04:05 colinxu2020

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
.wslconfig found
Detected appx version: 1.0.1.0
Found no WSL traces in the logs

github-actions[bot] avatar May 10 '25 04:05 github-actions[bot]

I have wsl installed earlier than smartdns windows edition. Obviously the smart dns service can't bind port 53 because the ICS service (I searched for it and the search engine tell me that it is necessary for wsl to run) occupied port 53. If you can start wsl normally you can find the srv in services.msc page. So your problem is probally just the same, because of the occupation of the same port 53. Btw, I'm wondering that some proxy applications (like clash) can listen port 53 and run well at the same time that ICS is running.

lkyu-ly avatar May 12 '25 05:05 lkyu-ly

I have wsl installed earlier than smartdns windows edition. Obviously the smart dns service can't bind port 53 because the ICS service (I searched for it and the search engine tell me that it is necessary for wsl to run) occupied port 53. If you can start wsl normally you can find the srv in services.msc page. So your problem is probally just the same, because of the occupation of the same port 53. Btw, I'm wondering that some proxy applications (like clash) can listen port 53 and run well at the same time that ICS is running.

Thanks for your advice, I think probably this is of the same reason, but Windows refused to use a abnormal port for DNS Service, so I can't change the port now. Is it possibly to let the WSL stop using port 53?

colinxu2020 avatar May 17 '25 10:05 colinxu2020