Package: nsd Version: 4.12.0-1 Severity: important
-- System Information: Debian Release: 13.0 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.12.41+deb13-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=pt_BR.UTF-8:pt:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages nsd depends on: ii adduser 3.152 ii init-system-helpers 1.68 ii libc6 2.41-12 ii libevent-2.1-7t64 2.1.12-stable-10+b1 ii libfstrm0 0.6.1-1+b3 ii libprotobuf-c1 1.5.1-1 ii libssl3t64 3.5.1-1 ii libsystemd0 257.7-1 ii openssl 3.5.1-1 nsd recommends no packages. nsd suggests no packages. -- no debconf information When upgrading from Bookworm to Trixie, I noticed that after rebooting the system, the nsd service, responsible for the Authoritative DNS, had not started. However, when running systemctl restart nsd.service, nsd would start normally. Upon checking the logs, I discovered that nsd was trying to start before IPv6 was configured on the network interface, causing the startup failure. The logs are shown below: 2025-08-18T19:33:10.183996-03:00 DNS-AUTORITATIVO-02-STZ nsd[959]: nsd starting (NSD 4.12.0) 2025-08-18T19:33:10.184105-03:00 DNS-AUTORITATIVO-02-STZ nsd[959]: can't bind udp socket 2804:XXXX:40:0:187:XXXX:159:11@53: Cannot assign requested address 2025-08-18T19:33:10.184142-03:00 DNS-AUTORITATIVO-02-STZ nsd[959]: server initialization failed, nsd could not be started 2025-08-18T19:33:10.196883-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE 2025-08-18T19:33:10.197009-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Failed with result 'exit-code'. 2025-08-18T19:33:10.197203-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Failed to start nsd.service - Name Server Daemon. 2025-08-18T19:33:10.416114-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Scheduled restart job, restart counter is at 1. 2025-08-18T19:33:10.418873-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Starting nsd.service - Name Server Daemon... 2025-08-18T19:33:10.484148-03:00 DNS-AUTORITATIVO-02-STZ nsd[1003]: nsd starting (NSD 4.12.0) 2025-08-18T19:33:10.484243-03:00 DNS-AUTORITATIVO-02-STZ nsd[1003]: can't bind udp socket 2804:XXXX:40:0:187:XXXX:159:11@53: Cannot assign requested address 2025-08-18T19:33:10.484276-03:00 DNS-AUTORITATIVO-02-STZ nsd[1003]: server initialization failed, nsd could not be started 2025-08-18T19:33:10.485385-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE 2025-08-18T19:33:10.485464-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Failed with result 'exit-code'. 2025-08-18T19:33:10.485691-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Failed to start nsd.service - Name Server Daemon. 2025-08-18T19:33:10.836173-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Scheduled restart job, restart counter is at 2. 2025-08-18T19:33:10.837853-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Starting nsd.service - Name Server Daemon... 2025-08-18T19:33:10.901042-03:00 DNS-AUTORITATIVO-02-STZ nsd[1008]: nsd starting (NSD 4.12.0) 2025-08-18T19:33:10.901138-03:00 DNS-AUTORITATIVO-02-STZ nsd[1008]: can't bind udp socket 2804:XXXX:40:0:187:XXXX:159:11@53: Cannot assign requested address 2025-08-18T19:33:10.901166-03:00 DNS-AUTORITATIVO-02-STZ nsd[1008]: server initialization failed, nsd could not be started 2025-08-18T19:33:10.902333-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE 2025-08-18T19:33:10.902418-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Failed with result 'exit-code'. 2025-08-18T19:33:10.902636-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Failed to start nsd.service - Name Server Daemon. 2025-08-18T19:33:11.063181-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Scheduled restart job, restart counter is at 3. 2025-08-18T19:33:11.064997-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Starting nsd.service - Name Server Daemon... 2025-08-18T19:33:11.132452-03:00 DNS-AUTORITATIVO-02-STZ nsd[1013]: nsd starting (NSD 4.12.0) 2025-08-18T19:33:11.132548-03:00 DNS-AUTORITATIVO-02-STZ nsd[1013]: can't bind udp socket 2804:XXXX:40:0:187:XXXX:159:11@53: Cannot assign requested address 2025-08-18T19:33:11.132582-03:00 DNS-AUTORITATIVO-02-STZ nsd[1013]: server initialization failed, nsd could not be started 2025-08-18T19:33:11.133930-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE 2025-08-18T19:33:11.134018-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Failed with result 'exit-code'. 2025-08-18T19:33:11.134286-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: Failed to start nsd.service - Name Server Daemon. 2025-08-18T19:33:11.405316-03:00 DNS-AUTORITATIVO-02-STZ systemd[1]: nsd.service: Scheduled restart job, restart counter is at 4. It is an intermittent issue because sometimes the system boots and the service starts successfully. To fix the problem, I had to do the following: # systemctl edit nsd.service and include the configuration below: [Unit] After=network-online.target Wants=network-online.target Ideally, the system should not require this kind of workaround, and this could catch a sysadmin by surprise, since at some point nsd may fail during a reboot.

