My local sites have seemingly lost the ability to resolve DNS from with Docker. The first signs were when my local sites started running extremely slowly and then I observed error messages being displayed in the control panel, such as:
WP HTTP Error: cURL error 28: Resolving timed out after 10553 milliseconds
After a bunch of debugging and fiddling, I was able to put in a temporary workaround by SSH-ing in and editing the nameserver entry in /etc/resolv.conf file to point directly to my router instead of the default 127.0.0.11 IP address. However, I understand this isn’t a permanent solution and I’d love to understand what could’ve caused this overnight change and how I can fix it properly. I’m running 2.0.6 on macOS Sierra.
Try going to Help » Restart Local’s Machine in Local. Sometimes VirtualBox’s network devices can get out of whack and simply restarting the machine will fix it.
Hi Clay.
I had previously attempted rebooting the entire host machine without success and unfortunately restarting the local VM hasn’t made any difference either.
Although editing config.json seemed like a promising solution, it’s not made any difference for any of my Local sites.
The only host-only network I have listed was “vboxnet0” - attempted to remove, but it’s regenerated whenever I restart the VM. I tried experimenting with changing the network adapters between NAT, bridged and host-only, but discovered that a host-only and NAT connections are both required in order to start or access the guest instance.
It’s still not obvious to me why this suddenly stopped working and the only functioning workaround is to edit the /etc/resolv.conf file