Another problem I found out in Arch Linux is if you're rebooting the Raspberry Pi with reboot
and having named
in the systemctl startup
it will throw a long list of errors resulting in not working properly.
The last lines of /var/log/messages.log
:
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 192.5.5.241#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 193.0.14.129#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 199.7.83.42#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 2001:500:2d::d#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 2001:7fe::53#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 2001:503:c27::2:30#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 2001:503:ba3e::2:30#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 2001:500:1::803f:235#53
Jan 1 01:00:30 raspberrypi named[294]: error (network unreachable) resolving 'raspberrypi/A/IN': 202.12.27.33#53
Jan 1 01:00:29 raspberrypi systemd[1]: Started Samba SMB/CIFS server.
Jan 1 01:00:30 raspberrypi dbus-daemon[122]: dbus[122]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Jan 1 01:00:30 raspberrypi dbus-daemon[122]: dbus[122]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
Jan 1 01:00:31 raspberrypi dhcpcd[287]: eth0: leased 192.168.178.* for 3600 seconds
Jan 1 01:00:35 raspberrypi named[294]: checkhints: unable to get root NS rrset from cache: not found
Jan 1 01:00:41 raspberrypi systemd[1]: Started OpenNTP Daemon.
Jan 1 01:00:41 raspberrypi systemd[1]: Starting Multi-User System.
Jan 1 01:00:41 raspberrypi systemd[1]: Reached target Multi-User System.
Jan 1 01:00:41 raspberrypi systemd[1]: Starting Graphical Interface.
Jan 1 01:00:41 raspberrypi systemd[1]: Reached target Graphical Interface.
Jan 1 01:00:41 raspberrypi systemd[1]: Startup finished in 2.839s (kernel) + 38.816s (userspace) = 41.656s.
I can see that the named server is starting before network is initialized so how can I get the named server be started after network has been initialized?
Starting it later over ssh with systemctl restart named
is not an option.
This may cause problems in systems where the Raspberry Pi is used as default nameserver like an intranet.
/usr/lib/systemd/system/named.service
:
[Unit]
Description=Internet domain name server
After=network.target
[Service]
ExecStart=/usr/sbin/named -f -u named
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop
[Install]
WantedBy=multi-user.target
.service
-file without using a separate start up script? I don't really find any information about how to start a service delayed. @krs013