I have seen this on one Raspberry Pi 3 system: named failing to start during a normal reboot.
The solution is to manually rcnamed start
as root
after boot.
From [Wayback] TUMBLEWEED Ordering cycle at boot with nss-lookup, the rcnamed status
is the same as on my system, but no solution in that thread:
# systemctl status named ● named.service - Berkeley Internet Name Domain (DNS) Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled) Active: inactive (dead)
Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found ordering cycle on named.service/start Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on time-sync.target/start Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on ntpd.service/start Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Found dependency on nss-lookup.target/start Jul 02 08:13:40 hpprol2 systemd[1]: nss-lookup.target: Job named.service/start deleted to break ordering cycle starting with nss-lookup.target/start
Apparently, sometimes there is a service startup dependency loop, and named becomes the victim of it, effectively rendering DNS inoperable.
My system was running this version of Tumbleweed:
statler:~ # cat /etc/SUSE-brand /etc/os-release openSUSE VERSION = tumbleweed NAME="openSUSE Tumbleweed" # VERSION="20200825" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20200825" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20200825" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" LOGO="distributor-logo"
On an identical system, the boot just worked fine, so it might be timing related.
waldorf:~ # cat /etc/SUSE-brand /etc/os-release openSUSE VERSION = tumbleweed NAME="openSUSE Tumbleweed" # VERSION="20200825" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20200825" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20200825" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" LOGO="distributor-logo"
It has been fixed late January 2021 as per [Wayback] Bug 1177491 – systemd ordering cycle with nss-lookup.target:
Josef Möllers 2021-01-27 15:50:15 UTCFixed by removing "Before=nss-lookup.target" from systemd's service file.
It means editing /etc/systemd/system/multi-user.target.wants/named.service
from
[Unit] Description=Berkeley Internet Name Domain (DNS) After=network.target After=time-sync.target Before=nss-lookup.target Wants=nss-lookup.target Wants=time-sync.target [Service] Type=forking ExecStart=/usr/sbin/named.init start ExecReload=/usr/sbin/named.init reload ExecStop=/usr/sbin/named.init stop [Install] WantedBy=multi-user.target
into
[Unit] Description=Berkeley Internet Name Domain (DNS) After=network.target After=time-sync.target Wants=nss-lookup.target Wants=time-sync.target [Service] Type=forking ExecStart=/usr/sbin/named.init start ExecReload=/usr/sbin/named.init reload ExecStop=/usr/sbin/named.init stop [Install] WantedBy=multi-user.target
Note that it is an alias, so it won’t show up in a versioned /etc
directory (for instance using etckeeper
):
# ls -Alh /etc/systemd/system/multi-user.target.wants/named.service lrwxrwxrwx 1 root root 37 Sep 5 2020 /etc/systemd/system/multi-user.target.wants/named.service -> /usr/lib/systemd/system/named.service
–jeroen