Debian using /etc/init.d/bind9 instead of /etc/systemd/system/named

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,158
It was found that some Debian 10 installs were using /etc/init.d/bind9 for startup, while DA was assuming the systemd box would be in the /etc/systemd/system/named.service. There were checks looking for bind9.services, but they failed, as the boot script ended up in /etc/init.d/bind9.
It was reported that the issue only showed itself when the box was restarted, as DA have have installed the missing /etc/systemd/system/named.service file.

The setup.sh has been updated to link /etc/init.d/named -> bind9, rather than needing to use the named_service_override option, for the cases where /etc/init.d/bind9 exists, and the bind9.service does not exist elsewhere.

It can be confirmed with "systemctl bind9 status" to see which boot script it being used.. where we'd be looking for the /etc/init.d/bind9 path.
If you do see this,the link can be created
Code:
ln -s bind9 /etc/init.d/bind9
but again, only if you do have this /etc/init.d/bind9 script present, and it's showning up as the script used in the systemctl bind9 status call. Once the link is created, the /etc/systemd/system/named.service could be removed.

If you are not having any named reload issues, there should be no need to make any changes.

John
 
Thanks for this, must have been late over there. To check I think you meant to write:
Bash:
systemctl status bind9

and to create the symlink:
Bash:
ln -s bind9 /etc/init.d/named
 
Last edited:
Weird it's changed on the version I just downloaded:
Bash:
1570,1574c1520
<                 if [ -s /etc/init.d/bind9 ]; then #I guess it's not systemd here.
<                     ln -s bind9 /etc/init.d/named
<                 else
<                     wget -O /etc/systemd/system/named.service ${SERVER}/custombuild/2.0/custombuild/configure/systemd/named.service.debian
<                 fi
---
>                 wget -O /etc/systemd/system/named.service ${SERVER}/custombuild/2.0/custombuild/configure/systemd/named.service.debian
 
So guys, what is the solution for this? It's really annoying to get those errors and especially the emails forever:
I don't see a bind9 file in the etc/init.d directory and the status command does not work on my Ubuntu Focal.
I really would like to fix this.
 
Here is what I can tell you right off the bat for me (maybe it helps anyone help me):

Bash:
lucian@server:/etc$ sudo dpkg -s bind9
[sudo] password for lucian:
Package: bind9
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 868
Maintainer: Ubuntu Developers <[EMAIL][email protected][/EMAIL]>
Architecture: amd64
Version: 1:9.16.1-0ubuntu2.9
Replaces: bind (<< 1:9.13.6~)
Depends: adduser, bind9-libs (= 1:9.16.1-0ubuntu2.9), bind9-utils (= 1:9.16.1-0ubuntu2.9), debconf | debconf-2.0, dns-root-data, lsb-base (>= 3.2-14), iproute2, netbase, libc6 (>= 2.7), libcap2 (>= 1:2.10), libjson-c4 (>= 0.13.1), liblmdb0 (>= 0.9.7), libmaxminddb0 (>= 1.3.0), libssl1.1 (>= 1.1.0), libxml2 (>= 2.7.4), zlib1g (>= 1:1.1.4)
Pre-Depends: init-system-helpers (>= 1.54~)
Suggests: bind-doc, dnsutils, resolvconf, ufw
Breaks: bind (<< 1:9.13.6~)
Conffiles:
 /etc/apparmor.d/usr.sbin.named 34502426376b676b22e36c63d3cbb5a9
 /etc/bind/bind.keys b6d32dd16ced89ad2b0fdb8f3bee7aab
 /etc/bind/db.0 8aba258068c8c60a7ade3952a285f57d
 /etc/bind/db.127 64f5cf50e8d8192109dad43b779e5e36
 /etc/bind/db.255 8aba258068c8c60a7ade3952a285f57d
 /etc/bind/db.empty 4e7a0ebff9a8936e5a72ec18c0c49214
 /etc/bind/db.local e5d27ead2d238928a08d33c7a7333477
 /etc/bind/named.conf 32be43ecfcb37f69bf967c15c368e184
 /etc/bind/named.conf.default-zones 9fbdc4657090b3b2a45f7e7b8468cf96
 /etc/bind/named.conf.local fb15a27656eafd86ff870effabc72f1e
 /etc/bind/named.conf.options 642e258554b7bd95f4fc71062ca82101
 /etc/bind/zones.rfc1918 d04252b4368b66e28376f92613842888
 /etc/default/named 0fcf4e70d1d3811d13a1f7b52fd5e384
 /etc/init.d/named 2f033c8e309de34d6ae67fca64292598
 /etc/insserv.conf.d/bind9 2f36010c32cff9acc445bb9b577aecf7
 /etc/network/if-down.d/bind9 dd11845d860cd2e30dce8556aa478eb2
 /etc/network/if-up.d/bind9 dd11845d860cd2e30dce8556aa478eb2
 /etc/ppp/ip-down.d/bind9 dd11845d860cd2e30dce8556aa478eb2
 /etc/ppp/ip-up.d/bind9 dd11845d860cd2e30dce8556aa478eb2
 /etc/ufw/applications.d/bind9 ac2316819866611a68b976db9125c9a7
Description: Internet Domain Name Server
 The Berkeley Internet Name Domain (BIND 9) implements an Internet domain
 name server.  BIND 9 is the most widely-used name server software on the
 Internet, and is supported by the Internet Software Consortium, [URL='http://www.isc.org']www.isc.org[/URL].
 .
 This package provides the server and related configuration files.
Homepage: [URL]https://www.isc.org/downloads/bind/[/URL]
Original-Maintainer: Debian DNS Team <[EMAIL][email protected][/EMAIL]>[CODE]
 
Looks like some Debian-derived distro changed the name from bind9 to named, very odd.

Let's keep things in 1 thread please.
seems something buggy is going on.
 
Just wanted to post the solution that worked for me, thanks to @smtalk :

Bash:
rm -f /etc/systemd/system/named.service
/usr/local/directadmin/custombuild/build update
/usr/local/directadmin/custombuild/build bind

Thank you Richard as well for your contribution! 10 stars.
 
You're very welcome, glad that smtalk found the solution, hopefully this also works for others with the same issue.
 
Back
Top