AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
23.63k stars 1.74k forks source link

When internet drops, Adguard stops serving all DNS requests, including rewrites. #2657

Closed norgan closed 2 years ago

norgan commented 3 years ago

Expected Behavior

Like a real DNs server, queries should be delivered from local zones and cached lookups, even when upstream servers are down.

Actual Behavior

All DNS queries fail and clients panic

Screenshots

Screenshot:

Additional Information

norgan commented 3 years ago

AdGuard Home v0.104.3

ainar-g commented 3 years ago

Hi, and thank you for your report.

@ameshkov, do we have an issue about an “offline mode”? I think we've discussed that before somewhere, but I can't find the related issue.

ameshkov commented 3 years ago

@ainar-g we don't, and the problem is caused by the max_goroutines limit, and yes, there was a ticket about that already.

We could lift the limit or set it to a higher value, this would help.

tezgno commented 3 years ago

This is definitely causing issues when there are ISP outages or on power related restarts. Is there any update on this one?

KF5JWC commented 3 years ago

Migrated away from Adguard due to this issue :(

timcappalli commented 3 years ago

Why is this flagged as feature request? This is a core deficiency.

ameshkov commented 3 years ago

The easy solution to this issue is to set max_goroutines to 0 in AdGuardHome.yaml.

Aikatsui commented 3 years ago

https://github.com/AdguardTeam/AdGuardHome/issues/1558

SanderGit commented 3 years ago

I think the issue reported in #1777 is also related.

SubtleShuttle commented 3 years ago

I'm not sure if this ticket means no local dns look ups work just while upstream dns servers are unavailable or if it means it doesn't work even when they become available again (my issues is the latter). If my internet goes down, I have to reboot my pi or restart the adguard service for it to process DNS requests again. I thought it just happened when I was using DoH upstream servers but now it happens for unencrypted upstream servers as well. max_goroutines set to 0 didn't fix it for me.

ameshkov commented 3 years ago

If my internet goes down, I have to reboot my pi or restart the adguard service for it to process DNS requests again.

This one is definitely something new, not related to this ticket.

SubtleShuttle commented 3 years ago

If my internet goes down, I have to reboot my pi or restart the adguard service for it to process DNS requests again.

This one is definitely something new, not related to this ticket.

Thanks. FWIW, I'm using a Raspberry Pi 3b. The only odd thing about my setup is that my ISP uses CGNAT. I don't think it's related as I haven't seen the issue with pihole.

SanderGit commented 3 years ago

If my internet goes down, I have to reboot my pi or restart the adguard service for it to process DNS requests again.

This one is definitely something new, not related to this ticket.

Sorry for that, because it was my impression as well that this is the case and @KF5JWC seems to refer to the same. I have this both on a RPi and in docker, with my own unbound as root server (which keeps working). After the connection drops and returns, AGH still does not work.

ameshkov commented 3 years ago

@rhraziel @SanderGit it would help a lot if you could record verbose-level log of this issue for us.

  1. Configure AdGuard Home to write verbose-level log.
  2. Reproduce the issue.
  3. Post the log file here.
KF5JWC commented 3 years ago

If my internet goes down, I have to reboot my pi or restart the adguard service for it to process DNS requests again.

This one is definitely something new, not related to this ticket.

Sorry for that, because it was my impression as well that this is the case and @KF5JWC seems to refer to the same. I have this both on a RPi and in docker, with my own unbound as root server (which keeps working). After the connection drops and returns, AGH still does not work.

This is an accurate understanding of the issues I ran into.

tezgno commented 3 years ago

This is the same issue I have as well. If I go and unplug my modem, for example, I can no longer resolve any DNS entries including those locally served/rewrites.

SubtleShuttle commented 3 years ago

@rhraziel @SanderGit it would help a lot if you could record verbose-level log of this issue for us.

I apologize, I hope someone else can provide logs for this. I've already moved off of Adguard for now and my Linux knowledge is a bit limited.

kvervo commented 3 years ago

For @rhraziel issue, I came across a similar report in #2058 However, I was not able to reproduce the problem 0.105.2

However, I can confirm a similar behavior when disabling protection, DNS rewrites would also stop working. Which I believe should not be the case.

Overall the scenario I believe should be implemented is the following:

SubtleShuttle commented 3 years ago

@rhraziel @SanderGit it would help a lot if you could record verbose-level log of this issue for us.

FYI, I've emailed logs to the devteam email address in regards to this.

SubtleShuttle commented 3 years ago

I've done a little more testing on this and I'm narrowing down what causes the issue (at least for me). If I use a DoH DNS provider OR I use the "browsing web security service" or the "parental control service", DNS resolution does not come back after an internet outage. If I'm not using DoH or web security or parental control, everything works fine after the internet outage. I added Adguard's ipv4 DNS servers to the bootstrap list but that didn't seem to resolve it. I'm just avoiding using DoH and the security/parental services for now but it would be nice to enable them if it didn't cause the resolution recovery issue.

Salvora commented 3 years ago

I am suffering from the same problem. I advertise adguard home ip address for the primary DNS from my router. I have local domains that I use consistently but when the internet connection gets interrupted, the whole network is confused. Rewrites doesn't work.

gabxav commented 3 years ago

Same error on AdGuard Home v0.106.2

amishv commented 3 years ago

Same issue is seen on MWAN3 switchover on OpenWRT. When the main WAN goes down AdGuard home stops serving the DNS request till I restart the application. I have tried both OpenWRT version on my router and Docker version on my NAS. dig @AdGuard_ip google.com takes a long time before failing with "no dns server found" , a parallel dig @8.8.4.4 google.com almost instantly returns the IP of google.com.

I am using a workaround to restart the Adguard container from the mwan3.user script when any WAN interface goes down or comes up, but this introduces appreciable delay in the network.

a1ad commented 3 years ago

Got the same problem! WAN down > adguard refuses to work until i restart adguard. Tested on Docker, linux native and opnsense. v0.106.3

ikifar2012 commented 3 years ago

Yep we have had issues with our ISP as well and I had to make a script to kill-9 the adguard process then start the service because the whole process seems to hang

ameshkov commented 3 years ago

Hi all, could you please try the edge channel build?

Probably, this issue is a duplicate of #3217 which seems to be fixed there.

amishv commented 3 years ago

Hi all, could you please try the edge channel build?

Probably, this issue is a duplicate of #3217 which seems to be fixed there.

@ameshkov , I do not see this issue, yet, in Version: v0.107.0-a.95+e113b276. The build is up for more than 30 hours.

ikifar2012 commented 3 years ago

Hi all, could you please try the edge channel build?

Probably, this issue is a duplicate of #3217 which seems to be fixed there.

What's the best way to switch my current install to edge?

ameshkov commented 3 years ago

Depends on your setup.

If you're using snapcraft or docker, just switch to the "edge" tag. If you're using a binary, download one from the edge channel, replace the old one and restart AdGuard Home.

Binaries links: https://github.com/AdguardTeam/AdGuardHome#test-unstable-versions

ikifar2012 commented 3 years ago

Depends on your setup.

If you're using snapcraft or docker, just switch to the "edge" tag. If you're using a binary, download one from the edge channel, replace the old one and restart AdGuard Home.

Binaries links: https://github.com/AdguardTeam/AdGuardHome#test-unstable-versions

Just had to find the binary on the releases page, I have been running for two days and my ISP is having issues so our internet has dropped at least 50 times, it seems to be doing fine

jdeluyck commented 2 years ago

Deployed today's edge after my ISP was playing ping-pong, seems to work.

ainar-g commented 2 years ago

@EugeneOne1, I think that your fix for #1558 might have fixed this one as well. Can you look into it?

EugeneOne1 commented 2 years ago

@ainar-g, it seems the issue has been fixed even earlier. @norgan, @a1ad, could you please check if the issue reoccurs in the latest edge/beta-channel builds?

a1ad commented 2 years ago

Its working fine here

ainar-g commented 2 years ago

We'll close this issue then. If anyone has similar issues with the latest beta and edge releases, please open a new issue. Thanks everyone.

handcoding commented 2 years ago

Does anyone know when this fix might be landing on the main trunk?

I stopped using AdGuard Home a few months ago because of this issue, but I’d love to come back if by chance this might be fixed on the main branch soon.

SubtleShuttle commented 2 years ago

Does anyone know when this fix might be landing on the main trunk?

I stopped using AdGuard Home a few months ago because of this issue, but I’d love to come back if by chance this might be fixed on the main branch soon.

Its been fixed as of version 107

handcoding commented 2 years ago

Good to know—thanks, @rhraziel!

conradseba commented 2 years ago

Hi. I'm running v0.108.0-b.9 and this is very much ongoing. It's driving me nuts. I'll also ditch AGH if this is not fixed. I'm sorry but I cannot spend time troubleshooting my setup instead of working. Hope you find a final solution :) Thanks.

EugeneOne1 commented 2 years ago

@conradseba, could you please collect a verbose log for us? You may send it to devteam@adguard.com.

abdalians commented 1 year ago

After weeks of struggling with this issue I finally decided to search and came across this thread. Setup:

abdalians commented 1 year ago

this is very much an active issue, please mark the ticket accordingly.

s1lviu commented 1 year ago

I can confirm I have this issue too on the latest AGH version.

ainar-g commented 1 year ago

@abdalians, @s1lviu, apologies for the late response. Can you collect the verbose logs as EugeneOne1 suggested above? Also, what kind of upstream are you using? DoH, DoT, or DoQ?

abdalians commented 1 year ago

I tried DoT and DoH - both of these reproduced the same problem. I have AdGuard filtering services turned off at the moment. I will try and capture logs over the weekend.

dinosoup1 commented 1 year ago

Commenting to maintain visibility on this issue - I have had to stop using AdGuard as my ISP is basically useless and anytime my network goes out, AdGuard ruins everything locally.

conradseba commented 1 year ago

I can also confirm that v0.108.0-b.11 does not address this issue either.

On Wed, 3 Aug 2022 at 20:37, dinosoup1 @.***> wrote:

Commenting to maintain visibility on this issue - I have had to stop using AdGuard as my ISP is basically useless and anytime my network goes out, AdGuard ruins everything locally.

— Reply to this email directly, view it on GitHub https://github.com/AdguardTeam/AdGuardHome/issues/2657#issuecomment-1204336604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPW67JOUIXZ4IK4PHKOGZ3VXK37FANCNFSM4XMCEXVQ . You are receiving this because you were mentioned.Message ID: @.***>

abdalians commented 1 year ago

the ticket status still remains closed, can we reopen this or do we need to open a new issue and reference this?

levz0r commented 1 year ago

Same issue happens on v0.107.28

sammyke007 commented 1 year ago

Still an issue