[solved] Local DNS not working


#1

I’ve recently installed 0.40 on a fresh Ubuntu image. This is a new box and no upgrades have been done.

The mail server has been working but today, while trying to debug an issue with another email server not receiving mail, I noticed that this box was not delivering mail and was the logs listed a bunch of NX domain errors.

On loading the admin console, I see these errors:

System

:heavy_multiplication_x: Local DNS (bind9) is not running (port 53).
:heavy_multiplication_x: Local DNS Control (bind9/rndc) is not running (port 953).

Running /etc/init.d/bind9 status, I get the following output:

● bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:named(8)

Feb 25 14:39:59 messaging.adam.co.za named[31467]: validating messaging.adam.co.za/A: no valid signature found
Feb 25 14:39:59 messaging.adam.co.za named[31467]:   validating dc0sv92fvqiij42aqu9uceev7nq6ps86.messaging.adam.co.za/NSEC3: no valid signature found
Feb 25 14:43:48 messaging.adam.co.za named[31467]: connection refused resolving '121.105.86.41.psbl.surriel.com/A/IN': 96.67.55.151#53
Feb 25 14:54:45 messaging.adam.co.za systemd[1]: Stopping BIND Domain Name Server...
Feb 25 14:54:45 messaging.adam.co.za named[31467]: received control channel command 'stop'
Feb 25 14:54:45 messaging.adam.co.za named[31467]: shutting down: flushing changes
Feb 25 14:54:45 messaging.adam.co.za named[31467]: stopping command channel on 127.0.0.1#953
Feb 25 14:54:45 messaging.adam.co.za named[31467]: no longer listening on 127.0.0.1#53
Feb 25 14:54:45 messaging.adam.co.za named[31467]: exiting
Feb 25 14:54:45 messaging.adam.co.za systemd[1]: Stopped BIND Domain Name Server.

On running the command service bind9 start, I notice that mail delivery does resume and the status page reflects expected status messages:

System

✓ All system services are running.
✓ SSH disallows password-based login.
✓ System software is up to date.
✓ Mail-in-a-Box is up to date. You are running version v0.40.
etc…

On rebooting the server, bind once again doesn’t load.

Please tell me where I should be looking! I’ve run the sudo mailinabox command in the hopes that it would reconfigure the service or the loading of the service.

The server doesn’t reboot often, so I’m happy that this will tide me over for now, but a longer term solution that does not require manual intervention will be needed.


#2

Looks like someone (or something) ran the systemctl stop bind9 command

As for it not starting on reboot, do:

systemctl enable bind9 and make sure no errors are output.


#3

Many thanks. The enable command has worked and bind9 survives a reboot.

It appears that the VPS host I’m using has bind9 installed on the image, but disabled. I don’t understand why. I guess that the mailinabox setup command makes the assumption that if bind9 is installed, it is running without performing any checks.