Dnsmasq VS bind (both using port 53, dnsmasq failing)

since a while i have dnsmasq failing beacause of port 53 already in use
i don’t see any symptomes of this so i didn’t act on it, but now i would like to know what to do about this ?

is dnsmasq realy necessary ? or bind ?

$ yunohost tools diagnosis
host: Debian 9.11
kernel: 3.14.32-xxxx-grs-ipv6-64
    repo: stable
    repo: stable
    repo: stable
    repo: stable
    version: 3.6.4
    md3: Mounted on /home, 1.8TiB (539.8GiB free)
    root: Mounted on /, 19.1GiB (7.4GiB free)
    ram: 15.6GiB (12.8GiB free)
    swap: 1022.0MiB (885.6MiB free)
  - nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  - nginx: configuration file /etc/nginx/nginx.conf test is successful
  avahi-daemon: running (enabled)
  dnsmasq: failed (disabled)
  dovecot: running (enabled)
  etherpad_mypads: running (enabled)
  fail2ban: running (enabled)
  glances: running (enabled)
  gogs: running (enabled)
  metronome: running (enabled)
  mysql: running (enabled)
  nginx: running (enabled)
  nslcd: running (enabled)
  php7.0-fpm: running (enabled)
  postfix: exited (enabled)
  redis-server: running (enabled)
  rspamd: running (enabled)
  slapd: running (enabled)
  ssh: running (enabled)
  ttrss: running (enabled)
  yunohost-api: running (enabled)
  yunohost-firewall: exited (enabled)
  dokuwiki: Dokuwiki
  etherpad_mypads: Etherpad Mypads
  gogs: Gogs
  jappix: Jappix
  jirafeau: Jirafeau
  kanboard: Kanboard
  kresus: Kresus
  nextcloud: Nextcloud
  piwigo: Piwigo
  rainloop: Rainloop
  roundcube: Roundcube
  ttrss: Tiny Tiny RSS
  zerobin: Zerobin
    name: meltdown
    vulnerable: None

$ systemctl status dnsmasq
● 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 Tue 2019-12-10 10:17:55 CET; 12min ago

Dec 10 10:17:55 ns3041292.ip-91-121-119.eu systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu dnsmasq[12937]: dnsmasq: syntax check OK.
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu dnsmasq[12940]: dnsmasq: failed to create listening socket for port 53: Address already in use
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 10 10:17:55 ns3041292.ip-91-121-119.eu systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
$ lsof -i -P -n | grep ":53 (LISTEN)"
named      6426            bind   21u  IPv4  678514031      0t0  TCP (LISTEN)
named      6426            bind   22u  IPv6  678514033      0t0  TCP [::1]:53 (LISTEN)

DNSmasq is the one that’s useful, and Bind ideally should not even be installed on your machine … Do you have any clue why it got installed ?

(Possibly if you don’t know why, and you want to investigate, you can apt install aptitude, then run aptitude why bind9)

1 Like

thanks Aleks
aptitude why bind9 tells me

$ aptitude why bind9
i   grub-common     Suggests   desktop-base (>= 4.0.6)              
p   desktop-base    Suggests   gnome | kde-standard | xfce4 | wmaker
p   gnome           Recommends brasero                              
p   brasero         Suggests   libdvdcss2                           
p   libdvd-pkg      Provides   libdvdcss2                           
p   libdvd-pkg      Depends    wget | devscripts                    
p   devscripts      Suggests   reprotest                            
p   reprotest       Suggests   qemu-system                          
p   qemu-system     Depends    qemu-system-arm                      
p   qemu-system-arm Suggests   samba                                
p   samba           Suggests   bind9 (>= 1:9.5.1)

which is not helpfull so far for me

any way i stoped and disabled bind9 (will see) and dnsmasq is now running well

thanks again !

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.