My named service is not starting

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,541
Location
Maastricht
see /usr/bin/systemctl start named.service 2>&1 as the error message.
That is not an error message.

I also don't know what that privacy message is doing there. Or did you try to add an image as example? If yes, it went wrong, try postimages.org or something like that, or use an attachment.

Anyway, if you are on Centos 7, try to start via SSH:
service start named
or
systemctl start named

If it's still not starting, have a look in your system log (/var/log/messages) to see if you have error notices.
 

pmjcreations

Verified User
Joined
Jul 3, 2019
Messages
67
I have sorted it, @Richard G.

The issue was with the primary domain's DNS was missing the NS's A Record.

I had to update the related named file.
 

adam2020

Verified User
Joined
Mar 3, 2020
Messages
12
@pmjcreations,

I'm having this problem at the moment, so I'm interested to know a little more. Do you mean the NS A record at the domain registrar end?
 

adam2020

Verified User
Joined
Mar 3, 2020
Messages
12
@pmjcreations

There was me thinking it was going to be an easy fix!

I'm new to DA - would you mind guiding me a little so I can look to see if my NS A is missing?
 

pmjcreations

Verified User
Joined
Jul 3, 2019
Messages
67
@adam2020,

Here is the first step to knowing the cause.

Try to create or delete a test domain's DNS zone?

That means if you have a test domain called example dot com, go to that domain's DNS Management.

Now add/remove any record.

I saw an Error message with detailed info when I had this issue.

Let me know if you see any error messages.
 

adam2020

Verified User
Joined
Mar 3, 2020
Messages
12
@pmjcreations

I went into DNS Administrator and found one record which was the name of my server


DomainLocal DataLocal Mail
mydomain.co.uk!NoYes

When I tried to remove that [mydomain.co.uk] I got this error:

Code:
Error Reading db file
Can't open file /var/named/xx.xxxxx.xxxxxxxxx.xx.xx.db for reading
---------------------------------------------
I also ran
Code:
 systemctl status named.service
and the output was:

Code:
named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/etc/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-03-04 11:57:06 GMT; 13s ago
  Process: 10899 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: zone 0.in-addr.arpa/IN: loaded serial 0
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: zone xx.xxxxx.xxxxxxxxx.xx.xx/IN: loading from master file /var/named/xx.xxxxx.xxxxxxxxx.xx.xx.db failed: file not found
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: zone xx.xxxxx.xxxxxxxxx.xx.xx/IN: not loaded due to errors.
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx bash[10899]: _default/xx.xxxxx.xxxxxxxxx.xx.xx/IN: file not found
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx systemd[1]: named.service: control process exited, code=exited status=1
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx systemd[1]: Unit named.service entered failed state.
Mar 04 11:57:06 xx.xxxxx.xxxxxxxxx.xx.xx systemd[1]: named.service failed.
 

adam2020

Verified User
Joined
Mar 3, 2020
Messages
12
I found this post on the forum https://forum.directadmin.com/threads/named-fails-to-start-on-a-centos7-5-vps.60319/

It seems to be the exact same problem I'm having. I tried again to remove the DNS entry I listed in the table on my previous post and oddly enough I didn't get an error this time, the DNS entry was removed. I was then able to start .named service successfully.

Whilst the .named service is now running without any DNS record - I'm sure there should be a DNS record in there....
 
Top