Reputation: 1
"I have a service running on Windows that was previously successfully connected to a server in WSL2 Ubuntu. However, I am now unable to use curl or telnet to access this service via the WSL host IP address specified in /etc/resolv.conf. but I can access when using the Wi-Fi adapter IP
For example, I am running python3 -m http.server 3457 from Windows. When I attempt to access this service from WSL Ubuntu using the command curl http://172.25.x.x:3457, I receive a 'Connection timed out' error (curl: (28) Failed to connect to 172.25.128.1 port 3457 after 133480 ms).
When I use the IP address associated with Wi-Fi (telnet 10.131.x.x 3457), it works as expected.
I'm puzzled by why the WSL adapter host IP is not functioning correctly. I have configured all communication to rely on this host IP. I would greatly appreciate any assistance.
I have also enabled the firewall between Windows and wsl through powershell –
Thanks, LN"
Upvotes: 0
Views: 1019
Reputation: 2062
I'm seeing the same issue. The Windows documentation as ever is incomplete...
They suggest that if you perform all the following steps you will be able to run systemctl list-units --type=service --state=running
:
$ sudo /etc/wsl.conf
and add:
[boot]
systemd=true
then you go to powershell and restart wsl using: wsl --shutdown
However, the fact that you can run the systemctl list command just tells you what is enabled and it doesn't point to a working systemd
that can query the status of the processes or run them. Hence you receive a bus error on some systems even if the systemctl goal specified by the Windows documentation is working. So there are other considers that are more illusive. One consideration is that there are particular Windows 11 installs that are not addressing the issues.
The specifications of my system that produces the failure whilst satisfying the Windows end goal is a Windows 11 Dell install with WSL2:
$ wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.2134
Upvotes: 0