cPanel DNS only, BIND needs to be restarted after reboot before Name Resolution works.

slim

Well-Known Member
May 27, 2004
77
8
158
Australia
cPanel Access Level
Root Administrator
Hi

I have two cPanel DNS only servers that work fine until rebooted - Neither box will resolve domains until I manually restart BIND.

This is fine if I remember, but a real problem if the machine gets rebooted when im not around (issue at DC, for example).

Has anyone else seen this problem or know how I can start trouble shooting it? When I restart BIND from within WHM, it seems to restart fine and DNS resolution starts to work. (testing using nslookup from remote box)

Both servers use CentOS 7.2 and are uptodate.
 

SysSachin

Well-Known Member
Aug 23, 2015
604
49
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,

I think start service on boot time is off on your server and that's way you are facing such issue.

Please provide me the output for the below command

Code:
chkconfig --list | grep named
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Yes, as mentioned in the previous response, it's possible your Named service is not configured to start when the system boots. Could you post the output from the command in the previous response?

Thank you.
 

slim

Well-Known Member
May 27, 2004
77
8
158
Australia
cPanel Access Level
Root Administrator
root@ns1 [~]# chkconfig --list | grep named

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.

Thats it.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Please use the following command if you are using CentOS/RHEL 7.x:

Code:
systemctl is-enabled named
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
However, if I reboot the DNS server it wont resolve till I restart BIND.
Would you mind opening a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

mfrison

Registered
Aug 11, 2016
1
0
1
Italy
cPanel Access Level
Root Administrator
Similar issue here on two cpanel dns only on centos 7.2.1511; it appears bind is started listening at localhost only, i have to manually trigger a restart after each boot (either via systemd or via /scripts/restartsrv_...) to let it be correctly binded to both the interfaces (localhost and the public ip). Bind is of course enabled for starting at boot via systemd.

Log at boot time:
Code:
Aug 11 13:17:50 ns2 named[906]: ----------------------------------------------------
Aug 11 13:17:50 ns2 named[906]: BIND 9 is maintained by Internet Systems Consortium,
Aug 11 13:17:50 ns2 named[906]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Aug 11 13:17:50 ns2 named[906]: corporation.  Support and training for BIND 9 are
Aug 11 13:17:50 ns2 named[906]: available at Software Support | Internet Systems Consortium
Aug 11 13:17:50 ns2 named[906]: ----------------------------------------------------
Aug 11 13:17:50 ns2 named[906]: adjusted limit on open files from 4096 to 1048576
Aug 11 13:17:50 ns2 named[906]: found 1 CPU, using 1 worker thread
Aug 11 13:17:50 ns2 named[906]: using 1 UDP listener per interface
Aug 11 13:17:50 ns2 named[906]: using up to 4096 sockets
Aug 11 13:17:50 ns2 named[906]: loading configuration from '/etc/named.conf'
Aug 11 13:17:50 ns2 named[906]: using default UDP/IPv4 port range: [1024, 65535]
Aug 11 13:17:50 ns2 named[906]: using default UDP/IPv6 port range: [1024, 65535]
Aug 11 13:17:50 ns2 named[906]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 11 13:17:50 ns2 named[906]: generating session key for dynamic DNS

Log if restarted when system is up:
Aug 11 13:18:11 ns2 named[1245]: ----------------------------------------------------
Aug 11 13:18:11 ns2 named[1245]: BIND 9 is maintained by Internet Systems Consortium,
Aug 11 13:18:11 ns2 named[1245]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Aug 11 13:18:11 ns2 named[1245]: corporation.  Support and training for BIND 9 are
Aug 11 13:18:11 ns2 named[1245]: available at Software Support | Internet Systems Consortium
Aug 11 13:18:11 ns2 named[1245]: ----------------------------------------------------
Aug 11 13:18:11 ns2 named[1245]: adjusted limit on open files from 4096 to 1048576
Aug 11 13:18:11 ns2 named[1245]: found 1 CPU, using 1 worker thread
Aug 11 13:18:11 ns2 named[1245]: using 1 UDP listener per interface
Aug 11 13:18:11 ns2 named[1245]: using up to 4096 sockets
Aug 11 13:18:11 ns2 named[1245]: loading configuration from '/etc/named.conf'
Aug 11 13:18:11 ns2 named[1245]: using default UDP/IPv4 port range: [1024, 65535]
Aug 11 13:18:11 ns2 named[1245]: using default UDP/IPv6 port range: [1024, 65535]
Aug 11 13:18:11 ns2 named[1245]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 11 13:18:11 ns2 named[1245]: listening on IPv4 interface eth0, XXX.XXX.XXX.XXX#53
Aug 11 13:18:11 ns2 named[1245]: generating session key for dynamic DNS
Note the additional listening log; also from the log it appears loading the same configuration at /etc/named.conf. Same problem appears on both the vps we use for dns (same centos 7 release).
 
Last edited by a moderator: