dnsmasq icon indicating copy to clipboard operation
dnsmasq copied to clipboard

Container keeps restarting

Open canzone opened this issue 6 years ago • 1 comments

Just installed in a Synology DS3615xs and it does not keep running. It keeps restarting. No logs in docker container, no errors in Docker logs at all (neither in /var/log).

Any hint on how to debug or find the cause?

canzone avatar Aug 07 '18 01:08 canzone

@canzone, I know this is super late response for you...but I was also encountering this same issue and think I understand it. Bear in mind I am using docker on a debian system, not on a NAS.

If you were having the same issue as me here is the fix. Ensure that your "base.conf" includes 'keep-in-foreground' like in the README.

Here is my explanation, which may be slightly inaccurate, Without this directive dnsmasq forks a new process to run as a daemon. Docker only keeps a container running if the initial process is still running, when the initial dnsmasq forks it quits and thus the container also quits.

As for logging, while testing you can add this directive to see dnsmasq logs in the docker logs output "log-facility=-" and for further debugging, if you want to see queries comming into your dnsmasq instance add "log-queries". I'd be careful with the log-queries as this may be quite noisy and could cause a lot of diskspace usage as docker logs all STDOUT/STDERR for a container. e.g. 01-base.conf

keep-in-foreground
log-facility=-
log-queries
...

crlorentzen avatar Feb 07 '20 20:02 crlorentzen