Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't access to Docker Desktop from WSL #12660

Closed
1 of 2 tasks
AsiaZhang0 opened this issue Mar 6, 2025 · 5 comments
Closed
1 of 2 tasks

I can't access to Docker Desktop from WSL #12660

AsiaZhang0 opened this issue Mar 6, 2025 · 5 comments

Comments

@AsiaZhang0
Copy link

AsiaZhang0 commented Mar 6, 2025

Windows Version

Windows [Version: 10.0.26100.3194]

WSL Version

2.4.11.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu

Other Software

Docker Desktop (Windows) 4.38.0

Repro Steps

  1. tomcat container
zhiming@Mamba:~$ docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED        STATUS                    PORTS                    NAMES
78ac81b8d365   tomcat    "catalina.sh run"        12 hours ago   Up About an hour          0.0.0.0:8080->8080/tcp   mycat
34e608669c89   redis     "docker-entrypoint.s…"   12 hours ago   Exited (0) 11 hours ago                            redis6381
c555f545e45d   redis     "docker-entrypoint.s…"   12 hours ago   Exited (0) 11 hours ago                            redis6380
  1. windows network inteface info
C:\Users\27204>ipconfig

Windows IP Configuration


Ethernet adapter 以太网:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter 本地连接* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter 本地连接* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter 以太网 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter WLAN:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::ec85:8936:4734:4709%23
   IPv4 Address. . . . . . . . . . . : 192.168.50.114
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.50.1

Ethernet adapter 蓝牙网络连接:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter vEthernet (Default Switch):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::e10e:2096:12d3:9d79%12
   IPv4 Address. . . . . . . . . . . : 172.30.240.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
  1. port status
C:\Users\27204>netstat -ano | findstr "8080"
  TCP    127.0.0.1:52254        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:52273        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:52274        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:52275        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:52688        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:52689        127.0.0.1:8080         ESTABLISHED     8048
  TCP    127.0.0.1:52690        127.0.0.1:8080         FIN_WAIT_2      8048
  TCP    127.0.0.1:63395        127.0.0.1:8080         ESTABLISHED     8048
  TCP    192.168.50.114:52292   192.168.50.114:8080    FIN_WAIT_2      8048
  TCP    192.168.50.114:52293   192.168.50.114:8080    FIN_WAIT_2      8048
  1. wslconfig
[wsl2]
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
[experimental]
hostAddressLoopback=true
autoMemoryReclaim=dropcache
  1. I get no response when i visit the localhost:8080

Image

  1. iptables
zhiming@Mamba:/etc$ sudo iptables -L -n -v
# Table `filter' contains incompatible base-chains, use 'nft' tool to list them.
Chain INPUT (policy ACCEPT 3663 packets, 158K bytes)
 pkts bytes target     prot opt in     out     source               destination
 1373 60994 ACCEPT     6    --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8080

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 98 packets, 5912 bytes)
 pkts bytes target     prot opt in     out     source               destination
   48  2148 ACCEPT     6    --  *      *       0.0.0.0/0            0.0.0.0/0            tcp spt:8080

Expected Behavior

I want to get the 404 or the index page

Actual Behavior

a few minutes later, there is no responsebody returned

Image

Diagnostic Logs

No response

Copy link

github-actions bot commented Mar 6, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@AsiaZhang0
Copy link
Author

/question

Copy link

github-actions bot commented Mar 6, 2025

Diagnostic information
Found '/question', adding tag 'question'

@AsiaZhang0 AsiaZhang0 changed the title I can't not access to Docker Desktop from WSL I can't access to Docker Desktop from WSL Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant