wardenenv / warden

Warden is a CLI utility for orchestrating Docker based developer environments
https://warden.dev
MIT License
412 stars 169 forks source link

Getting ERR_NAME_NOT_RESOLVED after docker update #569

Closed VivekShingala closed 1 year ago

VivekShingala commented 1 year ago

Hello

Recently, my docker was updated to the latest version and after that my all magento 2 projects are not working on the browser.

Getting this error: ERR_NAME_NOT_RESOLVED

Screenshot 2022-12-30 at 10 13 06 AM

navarr commented 1 year ago

I had a similar issue with a fork, and I'm unsure if this is the fix. I would recommend trying these things:

First Thing to Try

Second Thing to Try

If not: Open your network panel in settings.

Click "Details" next to your connection (this might have to be done for all connections you plan to use Warden on)

Go to the DNS tab, and ensure 127.0.0.1 exists at the top of the DNS servers:

These changes may also need a restart to take effect.

Let me know how that works. If this is what starts being required, we'll have to update documentation.

VivekShingala commented 1 year ago

Hi @navarr

Thank you.

I did the second thing already, but it didn't help.

I tried the first thing you suggested and restarted my Mac. However, both of these didn't help, and I am getting the same screen.

VivekShingala commented 1 year ago

Hi @navarr

I checked dnsmasq in two Macs and the Mac which doesn't work has 53:53 (UDP) connection. Can that be an issue?

Not Working Screenshot 2023-01-05 at 10 06 24 AM

Working ff2932e1684efa762c8a0474cf99620e5cabbebdf04d152e35e88b1eef9a55e7 copy

navarr commented 1 year ago

On my Mac (where it works) I have 53:53 (UDP).

You can try a warden svc pull;warden svc up in case a DNSMasq update fixes it. Unfortunately this type of issue is fairly difficult to debug.

Could you provide the output of dig @127.0.0.1 traefik.warden.test? Maybe that will shed some answers

VivekShingala commented 1 year ago

Hi @navarr

Tried warden svc pull;warden svc up but it didn't help.

Below is the output for dig command:

dig @127.0.0.1 traefik.warden.test

; <<>> DiG 9.10.6 <<>> @127.0.0.1 traefik.warden.test
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
navarr commented 1 year ago

@VivekShingala Could you please provide

lsof -nP | grep :53?

VivekShingala commented 1 year ago

lsof -nP | grep :53 Google 612 vivekshingala 61u IPv4 0x4e33c5b5ce7adc69 0t0 UDP 192.168.0.104:53335->142.250.196.74:443 Screenshot 2023-01-05 at 8 08 44 PM

navarr commented 1 year ago

So Docker definitely isn't grabbing Port 53 like it should be. If you haven't yet, you might try warden svc down -v;warden svc up as a sort of "re-install" of the services, that's very much a trial-and-error approach as I'm unsure what would prevent warden from grabbing that port.

You should expect to see in that lsof command something like:

com.docke   798 navarr  200u     IPv4 0x6920c80b56f2ea27          0t0                 UDP 127.0.0.1:53

Which indicates that Docker is listening for DNS.

VivekShingala commented 1 year ago

Hi @navarr

Thank you for guiding in the right direction. After knowing that the Docker was not listening to localhost, I tried below steps to fix the issue and it worked.

  1. Remove Docker
  2. Run warden svc down
  3. Restart Mac
  4. Install Docker (Docker Compose)
  5. Run warden svc up

Screenshot 2023-01-07 at 12 47 28 PM

Bang! And it works fine now. Thanks again.

VivekShingala commented 1 year ago

Happened again after docker update. This time worked using this solution.

https://github.com/wardenenv/warden/issues/262#issuecomment-748291589

PS: in new version of warden docker-composer for dnsmasq has been changed to below. /usr/local/opt/warden/docker/docker-compose.dnsmasq.yml