Problem with DNS

Discussion in 'General' started by last_warrior, Nov 13, 2007.

  1. last_warrior

    last_warrior New Member

    Hello. I have a problem with BIND. When I'm trying to start it system give me back this message:

    Failed to start BIND : Starting named: Error in named configuration: /etc/named.conf:3: change directory to '/var/named/chroot/var/named' failed: file not found /etc/named.conf:3: parsing failed [FAILED]

    Before i start to write this message, I red all threads on this forum, but it dose not help me.

    In ISP Config on my server:
    1) named.conf: /var/named/chroot/etc/named.conf
    2) Zonefiles Dir.:/var/named/chroot/var/named

    Also i try to set permisions on folders like was written in CentOS 5 perfect installation. But system still give me error message.

    Please, help me.
    Thanks in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried to set the named.conf in ISPConfig to: /etc/named.conf ?
     
  3. last_warrior

    last_warrior New Member

    Yes, but it does not help...
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/named/chroot
    ?
     
  5. last_warrior

    last_warrior New Member

    [root@edem ~]# ls -la /var/named/chroot
    total 40
    drwxrwxr-x 6 root named 4096 Nov 5 14:13 .
    drwxr-xr-x 5 root named 4096 Jul 24 19:55 ..
    drwxr-x--- 2 root named 4096 Jul 24 19:55 dev
    drwxr-x--- 2 root named 4096 Nov 12 23:22 etc
    dr-xr-xr-x 150 root root 0 Nov 12 22:55 proc
    drwxrwxr-x 5 root named 4096 Mar 14 2003 var
    [root@edem ~]#
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Please run
    Code:
    chmod 755 /var/named/chroot/etc
     
  7. last_warrior

    last_warrior New Member

    I did it, but it does not help....
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Please post the outputs of
    Code:
    ls -la /var
    ls -la /var/named
    ls -la /var/named/chroot
     
  9. last_warrior

    last_warrior New Member

    [root@edem ~]# ls -la /var
    total 200
    drwxr-xr-x 25 root root 4096 Nov 5 20:23 .
    drwxr-xr-x 23 root root 4096 Nov 12 22:55 ..
    drwxr-xr-x 2 root root 4096 Nov 5 12:39 account
    drwxr-xr-x 13 root root 4096 Nov 5 15:55 cache
    drwxr-xr-x 2 root root 4096 Mar 14 2007 crash
    drwxr-xr-x 2 root root 4096 Mar 17 2007 cvs
    drwxr-xr-x 3 root root 4096 Nov 5 12:39 db
    drwxr-xr-x 3 root root 4096 Nov 5 12:38 empty
    drwxr-xr-x 2 root root 4096 Mar 29 2007 games
    drwxr-xr-x 25 root root 4096 Nov 5 12:42 lib
    drwxr-xr-x 2 root root 4096 Mar 29 2007 local
    drwxrwxr-x 5 root lock 4096 Nov 19 04:02 lock
    drwxr-xr-x 13 root root 4096 Nov 18 23:59 log
    lrwxrwxrwx 1 root root 10 Nov 5 12:34 mail -> spool/mail
    drwxr-xr-x 5 root named 4096 Jul 24 19:55 named
    drwxr-xr-x 2 root root 4096 Mar 29 2007 nis
    drwxr-xr-x 2 root root 4096 Mar 29 2007 opt
    drwxr-xr-x 2 root root 4096 Mar 29 2007 preserve
    drwxr-xr-x 2 root root 4096 May 19 2007 racoon
    drwxr-xr-x 23 root root 4096 Nov 19 17:56 run
    drwxr-xr-x 14 root root 4096 Nov 5 14:31 spool
    drwxrwxrwt 2 root root 4096 Nov 11 23:29 tmp
    drwx------ 2 root root 4096 Jan 7 2007 tux
    drwx------ 2 root bin 4096 Nov 7 00:05 webmin
    drwxr-xr-x 16 root root 4096 Nov 12 00:30 www
    drwxr-xr-x 3 root root 4096 Nov 5 12:38 yp

    [root@edem ~]# ls -la /var/named
    total 40
    drwxr-xr-x 5 root named 4096 Jul 24 19:55 .
    drwxr-xr-x 25 root root 4096 Nov 5 20:23 ..
    drwxrwxr-x 6 root named 4096 Nov 5 14:13 chroot
    drwxrwx--- 2 named named 4096 Jul 24 19:55 data
    drwxrwx--- 2 named named 4096 Jul 24 19:55 slaves

    [root@edem ~]# ls -la /var/named/chroot
    total 40
    drwxrwxr-x 6 root named 4096 Nov 5 14:13 .
    drwxr-xr-x 5 root named 4096 Jul 24 19:55 ..
    drwxr-x--- 2 root named 4096 Jul 24 19:55 dev
    drwxr-xr-x 2 root named 4096 Nov 12 23:22 etc
    dr-xr-xr-x 135 root root 0 Nov 12 22:55 proc
    drwxrwxr-x 5 root named 4096 Mar 14 2003 var
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Can you try this?
    Code:
    chmod 755 /var/named/
    chmod 775 /var/named/chroot/
    chmod 775 /var/named/chroot/var/
    chmod 775 /var/named/chroot/var/named/
    chmod 775 /var/named/chroot/var/run/
    chmod 777 /var/named/chroot/var/run/named/
    cd /var/named/chroot/var/named/
    ln -s ../../ chroot
     
  11. last_warrior

    last_warrior New Member

    It did not help :-(

     
  12. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    updatedb
    locate named.conf
    ?
     
  13. last_warrior

    last_warrior New Member

    [root@edem web]# updatedb
    [root@edem web]# locate named.conf
    /etc/dbus-1/system.d/named.conf
    /root/ispconfig/isp/conf/named.conf.master
    /usr/share/doc/bind-9.3.3/sample/etc/named.conf
    /usr/share/logwatch/default.conf/services/named.conf
    /usr/share/man/man5/named.conf.5.gz
    /var/named/chroot/etc/named.conf
    /var/named/chroot/etc/named.conf~
    [root@edem web]#


    updatedb give me nothing. but the output of "locale named.conf" you can see :)
     
  14. falko

    falko Super Moderator Howtoforge Staff

    What's in /var/named/chroot/etc/named.conf?
     
  15. last_warrior

    last_warrior New Member

    [root@edem ~]# mcedit /var/named/chroot/etc/named.conf

    options {
    pid-file "/var/named/chroot/var/run/named/named.pid";
    directory "/var/named/chroot/var/named";
    auth-nxdomain no;
    /*
    * If there is a firewall between you and nameservers you want
    * to talk to, you might need to uncomment the query-source
    * directive below. Previous versions of BIND always asked
    * questions using port 53, but BIND 8.1 uses an unprivileged
    * port by default.
    */
    // query-source address * port 53;
    };

    //
    // a caching only nameserver config
    //
    zone "." {
    type hint;
    file "named.root";
    };

    zone "0.0.127.in-addr.arpa" {
    type master;
    file "named.local";
    };

    zone "139.99.83.in-addr.arpa" {
    type master;
    file "pri.139.99.83.in-addr.arpa";
    };


    zone "edem.lt" {
    type master;
    file "pri.edem.lt";
    };



    //// MAKE MANUAL ENTRIES BELOW THIS LINE! ////
     
  16. falko

    falko Super Moderator Howtoforge Staff

    What'S the output of
    Code:
    ls -la /var/named/chroot/var/named
    ?
     
  17. last_warrior

    last_warrior New Member

    [root@edem ~]# ls -la /var/named/chroot/var/named
    total 56
    drwxrwxr-x 4 root named 4096 Nov 14 11:58 .
    drwxrwxr-x 5 root named 4096 Mar 14 2003 ..
    lrwxrwxrwx 1 root root 12 Nov 5 14:09 chroot -> ../../chroot
    drwxrwx--- 2 named named 4096 Aug 25 2004 data
    -rw-r--r-- 1 root root 426 Nov 5 14:11 named.local
    -rw-r--r-- 1 root root 2769 Nov 11 23:55 named.root
    -rw-r--r-- 1 named named 618 Nov 11 23:55 pri.139.99.83.in-addr.arpa
    -rw-r--r-- 1 named named 583 Nov 11 23:55 pri.139.99.83.in-addr.arpa~
    -rw-r--r-- 1 named named 963 Nov 14 11:28 pri.edem.lt
    -rw-r--r-- 1 named named 775 Nov 14 11:29 pri.edem.lt~
    drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
     
  18. falko

    falko Super Moderator Howtoforge Staff

    Looks ok... :confused:
     
  19. last_warrior

    last_warrior New Member

    But what should I do now ? May be there is a way how to reinstall BIND with out reinstaling ISP Config ?
     

Share This Page