wardenenv / warden

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

Dnsmasq No Longer Working After Upgrade To v0.14.2 [Brew] #768

Closed ryan-copeland closed 5 months ago

ryan-copeland commented 5 months ago

Version of Homebrew

4.3.1

Operating System and Installation Method

Mac OS 14.4.1

Describe the Bug

Since upgrading warden on my system to v0.14.2 I am no longer able to access any of my local development sites. The URLs now just point to 404s. I've got the same issue when I try to access any of the global services. All URLs return 404s.

For example all of the below return 404s;

https://traefik.warden.test/

https://portainer.warden.test/

https://dnsmasq.warden.test/

https://mailhog.warden.test/

If I go and manually add the domain to my local hosts file and point it to 127.0.0.1 it then works so it looks as though Dnsmasq has stopped working since upgrading.

Has anyone else come across this issue before? What is the best way to debug Dnsmasq?

It might also be worth noting that I am using OrbStack rather than Docker desktop.

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

No response

Additional context

No response

arendarenko commented 5 months ago

Hi @ryan-copeland Have you tried running warden svc down && warden svc up after upgrade? If the issue still persists you can check dnsmasq logs under Orbstack context menu -> warden -> dnsmasq -> Logs

ryan-copeland commented 5 months ago

Hi @arendarenko - Thanks for replying on this ticket. I ran the following commands after the upgrade;

warden svc down -v && warden svc up

But this has still resulted in any .test domain not being pointed at 127.0.0.1. The logs from dnsmasq can be seen below;

[webproc] 2024/05/24 06:56:08 loaded config file '/etc/dnsmasq.conf' from disk
[webproc] 2024/05/24 06:56:08 agent listening on http://0.0.0.0:8080...
dnsmasq: started, version 2.90 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-nftset auth no-cryptohash no-DNSSEC loop-detect inotify dumpfile
dnsmasq: using nameserver 1.0.0.1#53
dnsmasq: using nameserver 1.1.1.1#53
dnsmasq: read /etc/hosts - 9 names

That all seems to look ok from what I can see. Is there some sort of configuration in warden that needs to be changed to enable dnsmasq?

arendarenko commented 5 months ago

@ryan-copeland logs looks good to me

I remember having similar issue with browser VPN enabled, but then I had ERR_TUNNEL_CONNECTION_FAILED error so it doesn't look like your case.

bap14 commented 5 months ago

@ryan-copeland Just to be sure, did you add the .test domain to your system's resolver so it knows to look to DNSMasq to resolve anything ending in .test? https://docs.warden.dev/configuration/dns-resolver.html

navarr commented 5 months ago

Additionally, the latest information regarding dnsmasq not working correctly is here: https://github.com/wardenenv/warden/issues/262#issuecomment-748291589

Sadly whenever this issue crops up it is very environment-specific

ryan-copeland commented 5 months ago

@bap14 @navarr Thanks for coming back to me on this. The stuff you sent over definitely pointed me in the right direction. I checked the /etc/resolver/test file on my local system and it contained the following;

nameserver 127.0.0.1
port 5053

I updated this to;

nameserver 127.0.0.1

And everything is now working as expected. Big thank you for everyones help!