Error DNS_PROBE_FINISHED_NXDOMAIN
Description After what appeared to be a successful installation, I'm encountering a DNS error when navigating to magento.test. I have already added 127.0.0.1 magento2.test to C:\windows\system32\drivers\etc\hosts as specified in the WSL2 documentation https://github.com/markshust/docker-magento/discussions/372. Everything else seems to be functioning correctly, as I'm able to run setup upgrades and install sample data.
Steps To Reproduce
- Install on Windows 11 WSL with one line script
- Go to https://magento.test/ on Chrome or Edge
Expected Result Display of Magento website
Actual Result Display of DNS_PROBE_FINISHED_NXDOMAIN
got the same issue here. Is there a Solution for this ? I´ve also tried to do the step by step which causes the same error. I´ve done the exact same thing on my mac (one-liner and step by step) and it´s working. But we need that for our Windows Laptops to get work.
Same problem here, running from a windows laptop with WSL2.
same issue happend to me from a Windows laptop with WSL2 and Docker v4.31.0
I had the same issue. Run these commands:
sudo mkdir -p /etc/systemd/resolved.conf.d
echo -e "[Resolve]\nDNS=127.0.0.1\nDomains=~test\n" \ | sudo tee /etc/systemd/resolved.conf.d/warden.conf > /dev/null
sudo systemctl restart systemd-resolved
and if you are supposed to open https://magento.test/ then you also should add 127.0.0.1 magento.test to C:\windows\system32\drivers\etc\hosts NOT magento2.test
I have this issue too. Maybe it's somehow related to IPv6, but I don't know how to resolve it.
I also noticed that /etc/hosts file is cleared after docker restarts.
ping magento.test
ping: magento.test: Name or service not known
after command bin/setup magento.test a new line 127.0.0.1 ::1 magento.test is added to the /etc/hosts file. But once you reboot the system and just start magento containers you found /etc/hosts is empty.
Have to run command bin/setup magento.test, but I believe this command is not meant for it.
But only after running it I am able too ping magento.test within wsl(ubuntu)
ping magento.test
PING ::1 (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.026 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.038 ms
Most Possible reason to it that host entry is not successfully added
so in mac
sudo nano /private/etc/hosts
see that 127.0.0.1 m2.test # or what ever domain you wanted and selected in one liner
Just to reiterate, this is a windows-only issue.
Since I don't run windows, I can't really debug/diagnose this, but if someone wants to create a PR to resolve this I'd definitely take it in (as long as it's backwards-compatible with mac/nix).
Hi, @gaeldelmer. I'm Dosu, and I'm helping the docker-magento team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You reported a DNS error (DNS_PROBE_FINISHED_NXDOMAIN) when accessing magento.test on Windows 11 WSL.
- Several users, including prodigitalsschulze93 and others, experienced similar issues on Windows laptops with WSL2 and Docker.
- MrBlaBlak suggested a solution involving systemd-resolved configuration changes and specific hosts file entries.
- Markshust acknowledged the issue as Windows-specific and is open to contributions for a cross-platform fix.
Next Steps:
- Please confirm if this issue is still relevant with the latest version of the docker-magento repository by commenting here.
- If there is no further activity, this issue will be automatically closed in 30 days.
Thank you for your understanding and contribution!