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.

named stopped working over night

Discussion in 'Bind / DNS / Nameserver Issues' started by mofolo, Nov 24, 2014.

  1. mofolo

    mofolo Member

    Joined:
    Jan 26, 2012
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hey Guys,

    I'm facing a serious problem which has knocked out my server.

    For some unknown reason, named is no longer working, despite doing my best to remediation the issues found on the logs.

    I get this error whenever I try to run the rebuilddnsconfig
    Code:
    warn [fixrndc] /usr/sbin/rndc status failed: rndc: connect failed: 127.0.0.1#953: connection refused
    And when I check the status of named:

    Code:
    root@host [/etc]# /etc/init.d/named status
    rndc: connect failed: 127.0.0.1#953: connection refused
    This is my /var/log/messages tail:

    Code:
    root@host [/etc]# tail /var/log/messages
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1, 108.xx.18.18#53
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp1, 108.xx.18.19#53
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp2, 108.xx.18.20#53
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp3, 108.xx.18.21#53
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp4, 108.xx.18.22#53
    Nov 24 22:32:25 host named[21687]: listening on IPv4 interface eth1:cp5, 108.xx.18.23#53
    Nov 24 22:32:25 host named[21687]: command channel listening on 127.0.0.1#953
    Nov 24 22:32:25 host named[21687]: couldn't open pid file '/var/run/named/named.pid': Permission denied
    Nov 24 22:32:25 host named[21687]: exiting (due to early fatal error)
    Nov 24 22:32:25 host /etc/init.d/named: named startup succeeded
    My configs are given these permissions:

    Code:
    root@host [/etc]# ls -lh | grep named.conf
    -rw-r--r--  1 named root  4.9K Nov 24 22:11 named.conf
    My named.conf has the following code: (minus zones)
    Code:
    include "/etc/rndc.key";
    
    controls {
    	inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
    };	
    
    options {
        /* make named use port 53 for the source of all queries, to allow
             * firewalls to block all ports except 53:
             */
    
        // query-source    port 53;
        
        recursion no;
    
        /* We no longer enable this by default as the dns posion exploit
            has forced many providers to open up their firewalls a bit */
    
        // Put files that named is allowed to write in the data/ directory:
        directory                "/var/named"; // the default
        pid-file                 "/var/run/named/named.pid";
        dump-file                "data/cache_dump.db";
        statistics-file          "data/named_stats.txt";
       /* memstatistics-file     "data/named_mem_stats.txt"; */
        allow-transfer    { "none"; };
    };
    
    Code:
    root@host [/etc]# ls -lh | grep rndc
    -rw-rw----  1 named named  479 Nov 24 21:29 rndc.conf
    -rw-rw----  1 named named  479 Nov 24 21:16 rndc.conf.bak
    -rw-rw----  1 named named   77 Nov 24 21:29 rndc.key

    My Named Folder Permissions:
    Code:
    ls -lh /var/run/named/
    total 8.0K
    drwxrwxr-x  2 named named 4.0K Jan  7  2013 ./
    drwxrwx--- 22 root  root  4.0K Nov 24 22:29 ../

    Is there anything that stands out here?

    Thanks for your help!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    650
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please let us know if the following commands help:

    Code:
    mv /etc/named.conf /etc/named.conf.cpbackup1
    /scripts/rebuilddnsconfig
    If the issue persists, please open 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.
     
  3. mofolo

    mofolo Member

    Joined:
    Jan 26, 2012
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hey Michael,

    All good, it turned out that my /var/lib/named directory was not set to the correct group/owner

    Changing the group/owner fixed my issues.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    650
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page