-
Notifications
You must be signed in to change notification settings - Fork 170
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
Docker CE (Not Docker Desktop) containers can not connect to its nameserver. #47
Comments
I think I was able to recreate your issue locally, and #48 should fix the issue. Can you try the fix with the artifact in this build and verify that it works for you as well? |
Hi @sakai135 , I really appreciate your kindness. Thanks again, |
Hi @sakai135 I'm sorry but the issue occurs again. the docker container can not query the default nameserver again, and HTTP request won't success as follows:
I don't have any idea why the issue occurs again although I confirmed the build works yesterday. Attached below is information about my environment. Could you check this? Regards, |
@tfl-takashima What do you get when running
Also for
Does start/stop/starting wsl-vpnkit or |
@sakai135 , thank you for quick response. The issue fixed after I rebooted my laptop. I re-close this issue, but please let me ask if rebooting doesn't work in the future. P.S here is my output:
Thanks again, |
Hi @sakai135, I found that alpine linux container seems not be able to resolve hostname by its default server. Here is my test result.
Regards, |
I can't seem to replicate the issue you're having. Could you try #57 (build) and show the logs from the following?
Since CentOS is ok, I am guessing that this is due to something between VPNKit and how Alpine/BusyBox/musl does DNS. #57 contains a change that routes the DNS and other requests to the WSL2 gateway/host instead of VPNKit if your VPN allows it. This lets VPNKit hande the network traffic but lets WSL2/Hyper-V handle DNS. If you see the line |
Hi @sakai135 , I tried the #57 and here are the result:
The issue seems to be specific to my environment, so I'll do workaround by tweaking docker's daemon.json. Thanks for your cooperation! |
This is regularly happening to me as well; DNS in alpine containers breaks until I stop and restart vpnkit:
|
@treyturner Can you try setting your own DNS servers in |
Hi,
Thanks for wsl-vpnkit, Docker containers of Docker CE (not docker desktop) on wsl2 can connect to external hosts by specifying ip address under VPN(PANGP) environment. But, it seems not be able to resolve hostname so the following curl command fails on the containers.
I checked the nameserver on docker containers are set to the address of virtual ethernet adapter for WSL and confirmed ping command to the address done successfully. And I can make the dns name resolution success when I disable the VPN or tweak metrics value of network adapters. Attaching containers to docker host (not bridge) network seems work as well.
As far as appearances go, only the access to the WSL virtual adapter per se for name resolution fails still using wsl-vpnkit. Is it an expected behavior?
Regards,
The text was updated successfully, but these errors were encountered: