Author Topic: Bind Not starting after restarting the server  (Read 12191 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Bind Not starting after restarting the server
« on: January 08, 2018, 08:14:07 AM »
Dear All,

       We are having a CentOS 7.4 on which the CWP is installed. The Server was running smoothly without out any issue and all the services are also fine. We are running almost 60 domains on this server, for all those domains the DNS record is present in the same server only. All the domain are working properly. Due to some internal reasons we restarted the server, after the restart, all the services are up and running except "named" service, It is failed to start. while we give "systemctl start named" getting the below error". Since the "named" is not get started we can not able to resolve names for all the 60 domains in the server. so for all the 60 domains we created the DNS record on another server and pointed the "A" record to the reported server, Now we can able to resolve the name for all the domains.Now my problem is why the "named" alone not getting a start, which was running before the server restart. Below we attached the log also. Kindly review and help us on this.

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

Bind Version:-
[root@srv log]# rpm -qa | grep bind
bind-utils-9.9.4-51.el7_4.1.x86_64
bind-license-9.9.4-51.el7_4.1.noarch
bind-9.9.4-51.el7_4.1.x86_64
bind-libs-lite-9.9.4-51.el7_4.1.x86_64
bind-libs-9.9.4-51.el7_4.1.x86_64

Log: (/var/messages):-

Jan  8 10:13:26 srv systemd: Starting Generate rndc key for BIND (DNS)...
Jan  8 10:13:26 srv systemd: Started Generate rndc key for BIND (DNS).
Jan  8 10:13:26 srv systemd: Starting Berkeley Internet Name Domain (DNS)...
Jan  8 10:13:26 srv bash: zone localhost.localdomain/IN: loaded serial 0
Jan  8 10:13:26 srv bash: zone localhost/IN: loaded serial 0
Jan  8 10:13:26 srv bash: 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
Jan  8 10:13:26 srv bash: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jan  8 10:13:26 srv bash: zone 0.in-addr.arpa/IN: loaded serial 0
Jan  8 10:13:26 srv bash: zone ns1.domain.com/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone ns2.domain.com/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.com/IN: has no NS records
Jan  8 10:13:26 srv bash: zone domain.com/IN: not loaded due to errors.
Jan  8 10:13:26 srv bash: _default/domain.com/IN: bad zone

Jan  8 10:13:26 srv bash: zone domain.us/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.cn/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.fr/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.es/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.hk/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.com.mx/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.in/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.eu/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.co/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.net/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.world/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.jp/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.us/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.ca/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.kr/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.no/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.tw/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.uk/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.cn/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.bg/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.es/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.eu/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.hk/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.in/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.it/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.sg/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.tw/IN: loaded serial 2013071600
Jan  8 10:13:26 srv bash: zone domain.com.br/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.co/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ca/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.kr/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.no/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.sg/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ph/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.be/IN: loaded serial 2018010514
Jan  8 10:13:27 srv bash: zone domain.asia/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.co/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.co.id/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.au/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.ve/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.de/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ua/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.uz/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.vn/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ru/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.pl/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.jp/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.mx/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.co.id/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.ve/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ph/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.uk/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.com.au/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.de/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.be/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.asia/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.vn/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.ua/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.uz/IN: loaded serial 2013071600
Jan  8 10:13:27 srv bash: zone domain.fr/IN: loaded serial 2013071600
Jan  8 10:13:27 srv systemd: named.service: control process exited, code=exited status=1
Jan  8 10:13:27 srv systemd: Failed to start Berkeley Internet Name Domain (DNS).
Jan  8 10:13:27 srv systemd: Unit named.service entered failed state.
Jan  8 10:13:27 srv systemd: named.service failed.


                In the above log, we found the below error
Jan  8 10:13:26 srv bash: zone domain.com/IN: has no NS records
Jan  8 10:13:26 srv bash: zone domain.com/IN: not loaded due to errors.
Jan  8 10:13:26 srv bash: _default/domain.com/IN: bad zone

Here is the zone file for domain.com:-

; Panel %version%
; Zone file for domain.com
$TTL 14400
domain.com.      86400      IN      SOA      ns1.domain.com.      info.domain.com.      (
                  2018010514 ;serial, todays date+todays
                  86400 ;refresh, seconds
                  7200 ;retry, seconds
                  3600000 ;expire, seconds
                  86400 ;minimum, seconds
      )


domain.com               86400      IN      NS      ns1.domain.com.
domain.com               86400      IN      NS      ns2.domain.com.
domain.com                   0         IN      A      xxx.xxx.xxx.xxx
localhost.domain.com     0         IN      A      127.0.0.1
domain.com                   0         IN      MX      5      domain.com.
mail                               0         IN      A      xxx.xxx.xxx.xxx
www                              0         IN      CNAME      domain.com.
ftp                                 0         IN      CNAME      domain.com.
ns1.domain.com          14400       IN      A      xxx.xxx.xxx.xxx
ns2.domain.com          14400       IN      A      xxx.xxx.xxx.xxx

                Kindly help us to get the named service star, Each of your replies is 66appreciable.

Thank You,

Offline
**
Re: Bind Not starting after restarting the server
« Reply #1 on: January 09, 2018, 03:17:18 AM »
What's the output of command?:-       systemctl status named.service
https://www.24x7servermanagement.com/
Server Management, Server Security, Server Monitoring.
India's Leading Managed Service Provider !!

Offline
*
Re: Bind Not starting after restarting the server
« Reply #2 on: January 09, 2018, 04:46:08 AM »
Dear  24x7servermanagement,

                     Thank you for your reply,

                     We managed to solve the issue, We have rebuilt the zone "domain.com" and added "A" records for ns1.domain.com and ns2.domain.com. Below is my zone file for domain.com,

; Generated by CWP
; Zone file for appleinfoway.com
$TTL 14400
domain.com.      86400      IN      SOA      ns1.domain.com.      info.domain.com.      (
                  2018010814 ;serial, todays date+todays
                  86400 ;refresh, seconds
                  7200 ;retry, seconds
                  3600000 ;expire, seconds
                  86400 ;minimum, seconds
      )


domain.com.                    86400      IN      NS      ns1.domain.com.
domain.com.                    86400      IN      NS      ns2.domain.com.
domain.com.                           0      IN      A       xxx.xxx.xxx.xxx
localhost.domain.com.             0      IN      A       127.0.0.1
domain.com.                           0      IN      MX      5     domain.com.
mail                                        0      IN      CNAME   domain.com.
www                                       0      IN      CNAME   domain.com.
ftp                                          0      IN      CNAME   domain.com.
ns1.domain.com.                     0      IN      A       xxx.xxx.xxx.xxx
ns2.domain.com.                     0      IN      A       xxx.xxx.xxx.xxx
 
                       

Offline
**
Re: Bind Not starting after restarting the server
« Reply #3 on: January 09, 2018, 05:31:12 AM »
Glad to see your issue has been resolved. :)
https://www.24x7servermanagement.com/
Server Management, Server Security, Server Monitoring.
India's Leading Managed Service Provider !!

Offline
*
Re: Bind Not starting after restarting the server
« Reply #4 on: January 10, 2018, 10:25:36 AM »
I also have this problem I do not start the bind service:

bind-license-9.9.4-51.el7_4.1.noarch
bind-9.9.4-51.el7_4.1.x86_64
bind-libs-lite-9.9.4-51.el7_4.1.x86_64
rpcbind-0.2.0-42.el7.x86_64
bind-libs-9.9.4-51.el7_4.1.x86_64
bind-utils-9.9.4-51.el7_4.1.x86_64
[root@cloud vxd]# 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 Wed 2018-01-10 10:11:17 UTC; 11min a                                                                  go
  Process: 4347 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "ye                                                                  s" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zon                                                                  e files is disabled"; fi (code=exited, status=1/FAILURE)

Offline
*
Re: Bind Not starting after restarting the server
« Reply #5 on: January 10, 2018, 10:33:52 AM »
This part of the code was the cause of my error ... eliminated the code working correctly.
zone “cloud.offshoringhost.com” IN {
type master;
file “cloud.zone”; //
allow-update { none; };
};
SE AGREGA
zone “40.36.15.51.in-addr.arpa” IN {
type master;
file “cloud.inv”;
allow-update { none; };
};