Brand new 22.04 LTS installation Named fails on startup

Installed 22.04 LTS and all went smoothly. I’m not a Linux expert but followed directions on installing services by LinuxTechi.

Bind9/Named refuses to start and I get the following error. I have no idea what’s causing it or how to fix it. If someone can point me in the right direction, I’m willing to do the research and reading.

——————–ERROR—————–

 named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-07-07 17:44:37 UTC; 46s ago
       Docs: man:named(8)

    Process: 3922821 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=1/FAILURE)
        CPU: 25ms

Jul 07 17:44:37 cazserver systemd[1]: named.service: Scheduled restart job, restart counter is at 5.
Jul 07 17:44:37 cazserver systemd[1]: Stopped BIND Domain Name Server.
Jul 07 17:44:37 cazserver systemd[1]: named.service: Start request repeated too quickly.
Jul 07 17:44:37 cazserver systemd[1]: named.service: Failed with result 'exit-code'.
Jul 07 17:44:37 cazserver systemd[1]: Failed to start BIND Domain Name Server.

——————–END ERROR——————-

Asked By: MattCaz

||

This problem is likely caused by configuration error. Have you tried running named-checkconf command?

Use journalctl -xeu named to read longer details from named. There should be exact reason. If the configuration is correct, I would guess another service is already listening on port 53. Try sudo ss -lnp | grep :53.

Answered By: Pihhan

In my case, ‘journalctl -xeu named’ showed that

isc_stdio_open ‘/var/log/named/query.log’ failed: permission denied

because must create the directory.

sudo mkdir /var/log/named

sudo chown bind:root /var/log/named

Answered By: Marco Lessard
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.