The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Bind / DNS / Nameserver Issues' started by slim, Jul 26, 2016.

  1. slim

    slim Well-Known Member

    Joined:
    May 27, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    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.
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    329
    Likes Received:
    25
    Trophy Points:
    28
    Location:
    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
    
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. slim

    slim Well-Known Member

    Joined:
    May 27, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    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.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. slim

    slim Well-Known Member

    Joined:
    May 27, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    I just ran this, and the result is: enabled

    However, if I reboot the DNS server it wont resolve till I restart BIND.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  8. mfrison

    mfrison Registered

    Joined:
    Aug 11, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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).
     
    #8 mfrison, Aug 11, 2016
    Last edited by a moderator: Aug 11, 2016
Loading...

Share This Page