[Dnsmasq-discuss] dnsmasq stops answering queries if upstream service is down for a period of time

Eliezer Croitoru ngtech1ltd at gmail.com
Thu Apr 15 08:46:48 UTC 2021


Hey,

I am encountering an issue with dnsmasq as a caching server only.
I have couple instances of dnsmasq ontop of an alpine linux podman
containers.
The  version I am using is:
# /usr/sbin/dnsmasq -v
Dnsmasq version 2.84rc2  Copyright (c) 2000-2021 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP
DHCPv6 no-Lua TFTP no-conntrack ipset auth cryptohash DNSSEC loop-detect
inotify dumpfile

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.

I am using couple upstream dns servers and if for any reason the upstream
DSL connection is down dnsmasq thinks that the servers are down.
Since it think both servers(2) are down for some reason it stops sending
them queries for enough time that even if the DSL connection is back up it
still thinks it's down.
I have read in the past it happens and have seen this on couple systems.
Currently What I am doing to verify if the service is up is to run a
specific domain query every 15 seconds which the ttl for the domain is 300
seconds.
Every query has a different random subdomain so it is expected to always
verify that the service is up.
If for any reason there is no answer it is assumed the service is down and
it's being restarted.

I would like to verify if there is a specific config option that can help me
to mitigate this specific issue.
If there isn't any existing one and since I have seen that it happens on
couple embedded routers and Firewalls which use dnsmasq
I would be happy to know what in the code is triggering this down state and
to try and patch the sources to allow users to disable this feature.

Thanks,
Eliezer





More information about the Dnsmasq-discuss mailing list