On Sat, 06 Jan 2018 18:08:40 +0000 raphael <[email protected]> wrote:
> Package: nsd
> Version: 4.1.14-1
> Severity: important
>
> Hi,
>
> Nsd does not start with Sysv :
> service nsd start
> chown: invalid group: 'nsd:nsd - -'
> [....] Starting Name Server Daemon: nsd[2018-01-06 17:58:55.052]
> nsd[5654]: notice: nsd starting (NSD 4.1.14)
> [2018-01-06 17:58:55.078] nsd[5654]: error: can't bind tcp socket:
> Cannot assign requested address
> [2018-01-06 17:58:55.078] nsd[5654]: error: cannot open control
> interface 127.0.0.1 8952
> [2018-01-06 17:58:55.079] nsd[5654]: error: could not open remote
> control port
> [2018-01-06 17:58:55.083] nsd[5654]: error: could not perform remote
> control setup
> failed!
>
> It worked when installing with systemd before switching to sysv.
> Thanks
I think this is related to the use of /usr/lib/tmpfiles.d/nsd.conf in
the sysv initscript. I stumbled over this over the weekend, and was
having a look to see if it's already been reported and found this bug
which seems to match.
On my system (a RaspberryPi with raspian stretch) it manifested
slightly differently, but I think mostly because I restarted the
process, rather than init trying to start the daemon after a fresh
boot.
In my case the directory was already in place, with the correct
ownership and mode, so all I got was the complaint from `chown`, which
on it's own wasn't fatal.
The cause, in my case at least, is the way `while read` is used in the
initscript as it ignores the (unused) age and arguments options. The
attached patch appears to fix it for me, hopefully it'll also work for
you.
Cheers.
Dameon.
--
><> ><> ><> ><> ><> ><> ooOoo <>< <>< <>< <>< <>< <><
Dr. Dameon Wagner, Unix Platform Services
IT Services, University of Oxford
><> ><> ><> ><> ><> ><> ooOoo <>< <>< <>< <>< <>< <><
--- etc/init.d/nsd.old 2018-03-05 11:22:52.734191829 +0000
+++ etc/init.d/nsd.new 2018-03-05 11:23:07.778430600 +0000
@@ -23,7 +23,7 @@
TMPFILE=/usr/lib/tmpfiles.d/$1.conf
if [ -r "$TMPFILE" ]; then
- while read type path mode user group; do
+ while read type path mode user group age args; do
if [ "$type" = "d" ]; then
mkdir -p "$path"
chmod "$mode" "$path"