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

Bug: WSL2 Issue with Acrylic DNS #14

Closed
3 tasks done
marbuser opened this issue Feb 11, 2020 · 6 comments
Closed
3 tasks done

Bug: WSL2 Issue with Acrylic DNS #14

marbuser opened this issue Feb 11, 2020 · 6 comments

Comments

@marbuser
Copy link

marbuser commented Feb 11, 2020

Basic info

Distro (Name and version) PHP Version Valet version
Ubuntu 18.04 7.4.2 1.0.5
  • I've checked the issue queue and could not find anything similar to my bug.
  • I'm on the latest version of valet-linux (valet --version): <Valet-Linux-Version>
  • I've run valet fix and valet install after updating and before submitting my issue/feature.

What is the problem?
I was previously running on WSL 1 and everything was working fine. However, I recently upgraded to WSL 2. I know this doesn't have "official" support for WSL 2 yet, but in terms of Valet everything works fine. The issue appears to be with Acrylic DNS.

When editing my adapter settings, I now have 2 adapters instead of 1 as show below;
image

I stuck to the first one just called Ethernet and changed my DNS settings to proxy through Acrylic, but the issue is it basically completely kills my internet.

When trying to access any .test domain it fails, and when trying to even access www.google.com I get the error This site can't be reached. As soon as I revert my adapter settings my internet comes back and it's working again (the .test domains still don't work obviously.)

My config and hosts file for Acrylic are completely stock except for the 1 change to add 127.0.0.1 *.test to the hosts file.

Asking here in case anyone else has ran into this problem and been able to fix it somehow.

As a side note, now that we have a separate adapter for WSL 2, we might actually be able to get dnsmasq working and remove the need for Acrylic completely, but I'm not very experienced with networking so I could be wrong.

EDIT:
Although as a secondary thing I just checked, I uninstalled Acrylic and it appears even if I set the .test domain manually in my hosts file like so;
127.0.0.1 my-doman.test
It still doesn't work. If I go directly to 127.0.0.1 I get a 404 - Not Found Valet page, but as soon as I try access my-domain.test I get the error ERR_CONNECTION_REFUSED. So no clue what's going on there? Just to make this more confusing, pinging the url from CMD gets a response.... So I literally have no idea what is going on now and I have no the faintest idea how to fix this. So hopefully someone can provide some input.

EDIT AGAIN:
I just tested downgrading to WSL 1 and followed the installation instructions exactly as they state on the WIki, as well setting my adapter settings and now I CAN load google.com and such, but when attempting to connect to any .test domain, I get the refused to connect. error.

So I'm a bit confused as to what the issue is. Perhaps this just doesn't play nice in general with the new Windows Insider Builds?

Either way though, I think it might be time to start looking into WSL 2. A majority of people I know doing dev work are already using 2 instead of 1 because of how much faster it is, and one of the major benefits of it is "Accessing network applications" which theoretically I think would make dnsmasq work as shown here;
https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#accessing-network-applications

@valeryan
Copy link
Owner

#7

@valeryan
Copy link
Owner

#7 (comment)

@valeryan
Copy link
Owner

Also, microsoft/WSL#4592

@valeryan
Copy link
Owner

This is a known issue with WSL2 and Acrylic DNS conflict because of the network changes. dnsmasq and acrylic are both trying to bind port 53 for DNS resolution and the conflict cause acrylic to stop. You can work around this by turning of dnsmasq or configuring it to use an alternate port.

@rhonivanpareja
Copy link

This is a known issue with WSL2 and Acrylic DNS conflict because of the network changes. dnsmasq and acrylic are both trying to bind port 53 for DNS resolution and the conflict cause acrylic to stop. You can work around this by turning of dnsmasq or configuring it to use an alternate port.

@valeryan how do i disable dnsmasq on wsl2?

@mschnee
Copy link

mschnee commented Sep 15, 2020

Because this is the top result on Google for "Acrylic WSL2", this is an issue with WSL2 and has been reported here: microsoft/WSL #4364

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

No branches or pull requests

4 participants