AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Timeouts over UDP

Open tbleiker opened this issue 1 year ago • 2 comments

Prerequisites

Platform (OS and CPU architecture)

Linux, AMD64 (aka x86_64)

Installation

Docker

Setup

On one machine

AdGuard Home version

v0.107.43

Action

For some time now, I struggle with slow internet. I finally found time to look into the problem and found out that I often get timeouts when resolving over UDP. Interestingly, there are no timeouts when resolving over TCP (nslookup -vc ...) .

~> nslookup www.gmail.com
;; communications error to 192.168.2.50#53: timed out
Server:         192.168.2.50
Address:        192.168.2.50#53

Non-authoritative answer:
Name:   www.gmail.com
Address: 216.58.215.229
Name:   www.gmail.com
Address: 2607:f8b0:400f:807::2005

Interesting as well: On the server itself (where the docker image is running), there are no timeouts with nslookup www.gmail.com localhost but with nslookup www.gmail.com 192.168.2.50.

I am back now on v0.107.29 and everything is working again. I can't tell if this is the last version without this problem. I currently don't have the time for more trial and error... 😀

Expected result

No timeouts when resolving over UDP (see above).

Actual result

Timeouts when resolving over UDP (see above).

Additional information and/or screenshots

Used port mapping: -p 53:53/tcp -p 53:53/udp

tbleiker avatar Jan 23 '24 12:01 tbleiker

Interesting as well: On the server itself (where the docker image is running), there are no timeouts with nslookup www.gmail.com localhost but with nslookup www.gmail.com 192.168.2.50.

Unless you're running with --net=host, it probably just means that the IP is different from within your container.

You can enable verbose logs to see if there are any UDP warnings or errors. Another useful thing is to use dig instead of nslookup, since it reports errors like bad source address much better.

ainar-g avatar Jan 23 '24 13:01 ainar-g

I am running without --net=host. But I tested with it as well - same outcome... I might test with verbose output when I find more time.

I stopped digging deeper because it perfectly works with an older version. I am wondering what changed...

tbleiker avatar Jan 23 '24 13:01 tbleiker