Simon Deziel <si...@sdeziel.info> wrote:

> On 2021-01-28 11:30 a.m., u...@net9.ga wrote:
> > Package: nsd
> > Version: 4.1.26-1
> > Severity: normal
> > 
> > The bottom lines of the package installation were:
> > 
> >      Preparing to unpack .../nsd_4.1.26-1_amd64.deb ...
> >      Job for nsd.service failed because the control process exited with 
> > error code.
> >      See "systemctl status nsd.service" and "journalctl -xe" for details.
> >      invoke-rc.d: initscript nsd, action "start" failed.
> >      * nsd.service - Name Server Daemon
> >         Loaded: loaded (file:/lib/systemd/system/nsd.service 
> > /lib/systemd/system/nsd.service; enabled; vendor preset: enabled)
> >         Active: activating (auto-restart) (Result: exit-code) since Wed 
> > 2021-01-27 16:38:05 EST; 12ms ago
> >           Docs: man:nsd(8) man:nsd(8)
> >        Process: 536 ExecStart=/usr/sbin/nsd -d (code=exited, 
> > status=1/FAILURE)
> >       Main PID: 536 (code=exited, status=1/FAILURE)
> >      
> >      Jan 27 16:38:05 systemd[1]: nsd.service: Main process exited, 
> > code=exited, status=1/FAILURE
> >      Jan 27 16:38:05 systemd[1]: nsd.service: Failed with result 
> > 'exit-code'.
> >      Jan 27 16:38:05 systemd[1]: Failed to start Name Server Daemon.
> >      dpkg: error processing package nsd (--configure):
> >       installed nsd package post-installation script subprocess returned 
> > error exit status 1
> >      Processing triggers for man-db (2.8.5-2) ...
> >      Processing triggers for systemd (241-7~deb10u5) ...
> >      Errors were encountered while processing:
> >       nsd
> >      
> >      Sub-process /usr/bin/dpkg returned an error code (1)
> > 
> > The package is left in an half-Conf state.
> > 
> > I think the problem is not having a working nsd configuration files. Which
> > is a bit trickier to solve. Just setting appropriate configuration files
> > and
> 
> 
> You should check "journalctl -u nsd" and see why it is failing to start. 
> A common situation is when systemd-resolved stub listener has already 
> bound port 53. You can check with:
> 
> { ss -nlt; ss -nlu; } | grep :53
> 
> If that's the case, setting DNSStubListener=no in 
> /etc/systemd/resolved.conf and restarting systemd-resolved usually fixes it.
> 
> HTH,
> Simon
> 

systemd-resolved is disabled.
But there was a listner on port 53, before nsd was started.
Prevoiusly, I was only looking for messages in systemd journal. Where 
there was no explicit error, other then stating nsd failed. Or that I 
erroneously skipped such a message. Right now I was also looking at the
syslog files. Indeed, there is a specific message about an address being
used.

I am not sure a query for a listener shouldn't be done by postinst. I
agree that on package upgrade, I would hope the daemon would bestarted
without the admin intervention. What is the point of starting the daemon
at postinst, after the package is installed for the 1st time, when there
might be no domain file set for it?

--
u34

Reply via email to