Author Topic: Unable to start BIND DNS server  (Read 11924 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Unable to start BIND DNS server
« on: December 25, 2018, 06:08:39 PM »
I am new to CWP and moved my all sites over. SSL applied and everything was working. for one domain I need to set MX record to google and i went to user account and added the MX record, it gave me error and after that my BIND DNS is not starting. I am getting error

Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.


Here is the log

Code: [Select]
systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-12-25 17:41:04 UTC; 16s ago
  Process: 18311 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)

Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns1.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns2.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: not loaded due to errors.
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: _default/aalasolutions.com/IN: bad zone
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone urdulook.info/IN: loaded serial 2018071600
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aala.pk/IN: loaded serial 2018071600
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: named.service: control process exited, code=exited status=1
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: Unit named.service entered failed state.
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: named.service failed.

I tried to rebuild the DNS zone files from DNS section in Admin panel, no luck so far

Offline
*
Re: Unable to start BIND DNS server
« Reply #1 on: December 25, 2018, 07:41:12 PM »
Solved by going to Edit Nameservers IPs in DNS section and hit save button with both options selected.

After that edited the zone file for my domain and manually added

Code: [Select]
@ IN MX 1 ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.

Looks everything is working now

Offline
*
Re: Unable to start BIND DNS server
« Reply #2 on: December 25, 2018, 07:48:08 PM »
hi,

Can you share the modified zone file to review?

Rodrigo.


I am new to CWP and moved my all sites over. SSL applied and everything was working. for one domain I need to set MX record to google and i went to user account and added the MX record, it gave me error and after that my BIND DNS is not starting. I am getting error

Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.


Here is the log

Code: [Select]
systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-12-25 17:41:04 UTC; 16s ago
  Process: 18311 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)

Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns1.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns2.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: not loaded due to errors.
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: _default/aalasolutions.com/IN: bad zone
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone urdulook.info/IN: loaded serial 2018071600
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aala.pk/IN: loaded serial 2018071600
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: named.service: control process exited, code=exited status=1
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: Unit named.service entered failed state.
Dec 25 17:41:04 server.aalasolutions.com systemd[1]: named.service failed.

I tried to rebuild the DNS zone files from DNS section in Admin panel, no luck so far

Offline
*
Re: Unable to start BIND DNS server
« Reply #3 on: December 26, 2018, 12:01:32 PM »
I am not sure which file to provide now, as bind dns is working at the moment. on the other hand I dont want to mess things up again :D

one thing I remember that when I provided MX record I provided TTL for that as well I think in Cache field. cant remember exactly, but when I added it manually, it didnt have TTL value. Shown above

Offline
*
Re: Unable to start BIND DNS server
« Reply #4 on: December 29, 2018, 03:28:39 PM »
I had exactly the same problem.

It looks as though the problem originates with:

Code: [Select]
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns1.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: NS 'ns2.aalasolutions.com' has no address records (A or AAAA)
Dec 25 17:41:04 server.aalasolutions.com bash[18311]: zone aalasolutions.com/IN: not loaded due to errors.

Although I had got separate ns1 and ns2 zone files for my name servers, it was only when I added the following lines to the main domain zone file (aalasolutions.com.db in this example) that BIND would restart (make sure that there is a blank line at the end of the file as well or it won't load):

Code: [Select]
ns1 14400 IN A xxx.xxx.xxx.xxx
ns2 14400 IN A xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is the ip address of the respective nameserver. I couldn't add those lines using the 'Edit Records' button, I had to use 'Edit File' option.

I suspect that the problem may be because the main domain zone file (aalasolutions.com.db) is processed before the nameserver files (ns1.aalasolutions.com.db, ns2.aasolutions.com.db).

Hope this helps someone