Dnsmasq keep failing

I am with YunoHost 4.0.7.1 (stable) on a Kimusfi Server.

My apps are update.

Since migration from Yunohost 3 to Yunohost 4, I have DNSMasq in a failed states and I can’t find why :frowning:

This is bellow what I have already tried without solving my problem. I was looking toward Bind9 because I already faced this issue when installing for the first time Yunohost of the Debian provided by Kimsufi.
I couldn’t find other possible issue in the forum.


admin@nos:~$ systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-09-13 20:39:09 UTC; 1min 11s ago

admin@nos:~$ systemctl status bind9.service
● bind9.service
Loaded: masked (Reason: Unit bind9.service is masked.)
Active: inactive (dead)

admin@nos:~$ sudo systemctl unmask bind9.service
Removed /etc/systemd/system/bind9.service.
admin@nos:~$ systemctl status bind9.service
● bind9.service - LSB: Start and stop bind9
Loaded: loaded (/etc/init.d/bind9; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

admin@nos:~$ sudo systemctl stop bind9.service
admin@nos:~$ systemctl status bind9.service
● bind9.service - LSB: Start and stop bind9
Loaded: loaded (/etc/init.d/bind9; generated)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

admin@nos:~$ sudo yunohost service regen-conf dnsmasq
Warning: ‘yunohost service regen-conf’ is deprecated! Please use ‘yunohost tools regen-conf’ instead.
Success! Configuration updated for ‘dnsmasq’
Warning: Job for dnsmasq.service failed because the control process exited with error code.
Warning: See “systemctl status dnsmasq.service” and “journalctl -xe” for details.
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/43-dnsmasq
dnsmasq:
applied:
/etc/resolv.dnsmasq.conf:
status: updated
pending:

admin@nos:~$ systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-09-13 20:45:41 UTC; 19s ago
Process: 22915 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Process: 22921 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)

admin@nos:~$ sudo systemctl start dnsmasq.service
Job for dnsmasq.service failed because the control process exited with error code.
See “systemctl status dnsmasq.service” and “journalctl -xe” for details.

admin@nos:~$ sudo apt-get remove bind9
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘bind9’ is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Could you help me t find where is the problem with my server ?

Can you show the output of journalctl -u dnsmasq -n 100 --no-hostname --no-pager

Thanks for your quick reaction !

The output is :


– Logs begin at Sun 2020-09-13 06:10:45 UTC, end at Mon 2020-09-14 15:00:45 UTC. –
Sep 13 20:39:09 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Sep 13 20:39:09 dnsmasq[21706]: dnsmasq: vérification de syntaxe OK.
Sep 13 20:39:09 dnsmasq[21713]: dnsmasq: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:39:09 dnsmasq[21713]: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:39:09 dnsmasq[21713]: IMPOSSIBLE de démarrer
Sep 13 20:39:09 systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 13 20:39:09 systemd[1]: dnsmasq.service: Failed with result ‘exit-code’.
Sep 13 20:39:09 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Sep 13 20:45:41 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Sep 13 20:45:41 dnsmasq[22915]: dnsmasq: vérification de syntaxe OK.
Sep 13 20:45:41 dnsmasq[22921]: dnsmasq: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:45:41 dnsmasq[22921]: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:45:41 dnsmasq[22921]: IMPOSSIBLE de démarrer
Sep 13 20:45:41 systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 13 20:45:41 systemd[1]: dnsmasq.service: Failed with result ‘exit-code’.
Sep 13 20:45:41 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Sep 13 20:46:30 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Sep 13 20:46:30 dnsmasq[22945]: dnsmasq: vérification de syntaxe OK.
Sep 13 20:46:30 dnsmasq[22954]: dnsmasq: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:46:30 dnsmasq[22954]: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 13 20:46:30 dnsmasq[22954]: IMPOSSIBLE de démarrer
Sep 13 20:46:30 systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 13 20:46:30 systemd[1]: dnsmasq.service: Failed with result ‘exit-code’.
Sep 13 20:46:30 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Sep 14 14:52:01 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server…
Sep 14 14:52:02 dnsmasq[9386]: dnsmasq: vérification de syntaxe OK.
Sep 14 14:52:02 dnsmasq[9391]: dnsmasq: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 14 14:52:02 dnsmasq[9391]: impossible de créer une socket d’écoute pour port 53 : Adresse déjà utilisée
Sep 14 14:52:02 systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 14 14:52:02 dnsmasq[9391]: IMPOSSIBLE de démarrer
Sep 14 14:52:02 systemd[1]: dnsmasq.service: Failed with result ‘exit-code’.
Sep 14 14:52:02 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
admin@nos:~$

I juste made :


admin@nos:~$ sudo netstat -tnlp | grep :53
tcp 0 0 178.32.220.207:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 127.0.0.1:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 178.32.220.207:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 178.32.220.207:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 178.32.220.207:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 127.0.0.1:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 127.0.0.1:5349 0.0.0.0:* LISTEN 778/turnserver
tcp 0 0 127.0.0.1:5349 0.0.0.0:* LISTEN 778/turnserver
tcp6 0 0 ::1:5349 :::* LISTEN 778/turnserver
tcp6 0 0 ::1:5349 :::* LISTEN 778/turnserver
tcp6 0 0 ::1:5349 :::* LISTEN 778/turnserver
tcp6 0 0 2001:41d0:8:decf:::5349 :::* LISTEN 778/turnserver
tcp6 0 0 2001:41d0:8:decf:::5349 :::* LISTEN 778/turnserver
tcp6 0 0 2001:41d0:8:decf:::5349 :::* LISTEN 778/turnserver
tcp6 0 0 ::1:5349 :::* LISTEN 778/turnserver
tcp6 0 0 2001:41d0:8:decf:::5349 :::* LISTEN 778/turnserver
tcp6 0 0 :::53 :::* LISTEN 593/AdGuardHome


Does it means I have AdGuardHome preventing dnsmasq to start ?

EDIT : I removed AdGuard Home and dnsmasq restarted properly.
Problem solved from my side!

Thanks @Aleks to put me on the right track… and have a good day!