Bind "named" doesn't start on boot?

Hi!

I just installed this newest iteration of opensuse (coming from 11.3); there is a lot to learn, I have to say :slight_smile:

Anyway, what I gathered is, that instead of rc…/init.d service files, there are the new systemd .service files, which lie in “/etc/systemd/system/multi-user.wants” (or something like that).

The problem is: the installed and manually configured named daemon won’t start automatically with the system.

But has no problem starting manually via “systemctl start named”!? (or “rcnamed start” for that matter!)

And I even tried editing/starting the DNS service via yast (which tells me the service is set to start automatically and is started), but that didn’t help either!

What am I missing?
Where is the service file?
How can it be that it won’t start automatically?

Thanks for your help!

For all systemd services, you can configure any to start by setting “enable”

For example the following

systemctl enable named.service

You can view all the options of systemctl the usual way by “–help” for example

systemctl --help

TSU

Ok, it was getting a little late yesterday…^^

I failed to mention that I of course enabled the service via Yast.

And this too should have happened after I configured named via Yast (this I did mention :P)

But you mentioned systemctl enable %service%.
Is there a way to show if it’s already enabled? (like systemctl show %service%) -> ok, of course there already is a “show” command, just not the info I wanted…:X

Hm, I can’t edit my post? Oh well…

What’s really funny about this:
There is a “named” service file in /etc/init.d

What?! rotfl!

Ok, I’m not sure why (that’s always a good sign^^), but named is now successfully starting at boot time.

The question on where/how the named service gets started remains; it won’t be because of “/etc/init.d/named”, right?

Thanks!

You can run “status”, ie

systemctl status named.service

TSU

On 07/30/2016 05:46 PM, tsu2 wrote:
>
> For all systemd services, you can configure any to start by setting
> “enable”
>
> For example the following
>
> Code:
> --------------------
> systemctl enable named.service
> --------------------
>
>
> You can view all the options of systemctl the usual way by “–help” for
> example
>
> Code:
> --------------------
> systemctl --help
> --------------------
>

You can also use <tab><tab> for command completion.
Using:

<code>
systemctl enable <tab><tab>
</code>

will show all of the services that are not enabled but can be enabled.


Ken
linux since 1994
S.u.S.E./openSUSE since 1996

This depends on whether it is native systemd unit for named or it is compatibility sysvinit service. For native units “systemctl status named.service” shows whether it is enabled or disabled. For compatibility services you need to use chkconfig; systemctl does not show it. You can distinguish native vs. compat by path which is shown on “Loaded” line. If it is /etc/init.d/named, this is compatibility service,

On my 13.2 and Leap 42.1 systems with the default configuration the named.service doesn’t exist:


 > systemctl list-unit-files | grep -i 'name'
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname         static
org.freedesktop.login1.busname          static
org.freedesktop.machine1.busname        static
org.freedesktop.timedate1.busname       static
dbus-org.freedesktop.hostname1.service  static
systemd-hostnamed.service               static
busnames.target                         static
 > 

AFAIK the current default desktop system name service cache daemon is: nscd.


 > systemctl list-unit-files | grep -i 'nscd'
nscd.service                            enabled
 > 
 > systemctl status nscd.service
nscd.service - Name Service Cache Daemon
   Loaded: loaded (/usr/lib/systemd/system/nscd.service; enabled)
   Active: active (running) since Mo 2016-08-01 07:08:00 CEST; 4h 26min ago
  Process: 905 ExecStart=/usr/sbin/nscd (code=exited, status=0/SUCCESS)
 Main PID: 907 (nscd)
   CGroup: /system.slice/nscd.service
           └─907 /usr/sbin/nscd

 > 

Unless of course you really want to run a full blown “BIND” service on what ever network.

named is unrelated to caching or nscd.

Please excuse my contradiction.
[HR][/HR]

Berkeley Internet Name Domain (BIND) is an implementation of the Domain Name System (DNS) protocols and provides an openly redistributable reference implementation of the major components of the Domain Name System. This package includes the components to operate a DNS server.

Nscd caches name service lookups and can dramatically improve performance with NIS, NIS+, and LDAP.

A default BIND installation sets up a Caching-only server.
A while ago, alternatives for Name Resolution were “tinydns” and “djbdns”.
The Linux kernel man pages <https://www.kernel.org/doc/man-pages/&gt; point to this man page: <http://man7.org/linux/man-pages/man8/nscd.8.html&gt;.
There’s this “BIND versus nscd” entry in the openSUSE mailing list archives: <https://lists.opensuse.org/opensuse/2001-06/msg01124.html&gt;
“serverfault” has this discussion: <linux - Should I run my own DNS recursor or local cache daemon? - Server Fault;
“StackExchange” has this answer: <dnsmasq - Why dig reports the dns server as 127.0.0.1 when I'm using a external DNS? - Unix & Linux Stack Exchange; (“dnsmasq” also used to be an alternative.)
[HR][/HR]Bottom line: use BIND if you really have to [private (secure) company network or a public name server]. A “normal” citizen is however, well advised to use “nscd” on their private “at home” machine(s).

Taking another look at BIND, agreed that it’s still a SysVinit service, so the following returns the named service status

chkconfig named

As arvidjaar points out, nscd is a service that exists on all networked openSUSE and performs hostname caching even as a client. In fact, if you need to purge your hostnames cache, restart this nscd service.

Although arvidjaar is correct that “SysVinit compatibility” services can be identified by the stated init.d path, that’s not 100%. In the past, I’ve found a few Unit files with the same executable path (pointing to the init.d script or binary), so YMMV.

That’s interesting that dnsmasq is no longer installed by default (at least on LEAP). I remember years of dnsmasq throwing non-critical errors (in 13.2?) which I never got around to looking into.

TSU

Executable path in unit definition has nothing to do with where unit definition comes from.

Well, I don’t know why or how but named is starting automatically on boot now. And it’s true, this seems to be an older “rc” SysV service. What ever, as long as it’s working :wink:

Looking at the Leap 42.1 “bind” package, it offers “sysvinit(named)” – in other words, the impression is that, the openSUSE BIND (9) package does not use systemd.
[HR][/HR]Looking at the openSUSE documentation however, it becomes clear that, the YaST configuration wizard is doing some clever things; which just what one expects of wizards and what they’re capable of . . . :wink:
For all those who do not believe in wizardry, the YaST configuration wizard sets up the systemd files required for the management of BIND within a systemd environment:
<https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.dns.html>
<https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/index.html>
<https://doc.opensuse.org/>
[HR][/HR]Searching elsewhere, it seems that “Bind9” is sort of available for systemd but, then again possibly not . . . (They possibly don’t have so many wizards working for them :sarcastic: )
<https://wiki.archlinux.org/index.php/BIND>
<https://wiki.debian.org/Bind9>
<https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-ubuntu-16-04>