BIND9 errors

Discussion in 'Server Operation' started by kkonline, Jan 11, 2009.

  1. kkonline

    kkonline New Member

    Hi,
    Below are my zone files and i receive the errors as specified.
    mysite.org.db
    Code:
     BIND data file for mysite.org
    ;
    $TTL    604800
    @       IN      SOA     mysite.org. (
                                2007011501         ; Serial
                                      7200         ; Refresh
                                       120         ; Retry
                                   2419200         ; Expire
                                    604800)        ; Default TTL
    ;
    @       IN      NS      ns1.ns.com.
    @       IN      NS      ns2.ns.com.
    mysite.org.    IN      MX      10      mail.mysite.org.
    mysite.org.    IN      A       200.19.227.135
    www                     IN      CNAME   mysite.org.
    mail                    IN      A       200.19.227.135
    ftp                     IN      CNAME   mysite.org.
    mysite.org.         IN      TXT     "v=spf1 ip4:200.19.227.135 a mx ~all"
    mail                    IN      TXT     "v=spf1 a -all"
    mysite:/etc/bind/zones/master#
    Code:
    ;
    ;dns_rdata_fromtext: mysite.org.db:10: near eol: unexpected end of input
    zone mysite.org/IN: loading master file mysite.org.db: unexpected end of input
    
    200.19.227.rev

    Code:
    mysite:/etc/bind/zones/master# more 200.19.227.rev
    $TTL 1d ;
    $ORIGIN 227.19.200.IN-ADDR.ARPA.
    @       IN      SOA     ns1.ns.com.    (
                                           2007011501
                                           7200
                                           120
                                           2419200
                                           604800
    )
            IN      NS      ns1.ns.com.
            IN      NS      ns2.ns.com.
    1       IN      PTR     ns1.ns.com.
    2       IN      PTR     ns2.ns.com.
    mysite:/etc/bind/zones/master#
    
    Code:
    mysite:/etc/bind/zones/master# named-checkzone mysite.org 200.19.227.rev
    200.19.227.rev:3: ignoring out-of-zone data (227.19.200.IN-ADDR.ARPA)
    dns_rdata_fromtext: 200.19.227.rev:8: near eol: unexpected end of input
    200.19.227.rev:12: ignoring out-of-zone data (1.227.19.200.IN-ADDR.ARPA)
    200.19.227.rev:13: ignoring out-of-zone data (2.227.19.200.IN-ADDR.ARPA)
    zone mysite.org/IN: loading master file 200.19.227.rev: unexpected end of input
    
    How to correct these errors?
     
  2. lqman

    lqman New Member

    Your db file, contain wrong configuration, i will try to FIX it
    mysite.org.db
    Code:
    ;BIND data file for mysite.org : 
    ;
    $TTL   604800
    @       IN      SOA     [B]ns1.mysite.org. yourmailaddress.mysite.org.[/B] (
                                 2007011501         ; Serial
                                       7200         ; Refresh
                                        120         ; Retry
                                    2419200         ; Expire
                                     604800)        ; Default TTL
    ;
    @                IN      NS           ns1.ns.com.
    @                IN      NS           ns2.ns.com.
    [B]@                IN      MX 10        mail.mysite.org.
    @                IN      A            200.19.227.135[/B]
    
    mail             IN      A           200.19.227.135
    www              IN     CNAME        mysite.org.
    ftp              IN     CNAME        mysite.org.
    mysite.org.      IN     TXT          "v=spf1 ip4:200.19.227.135 a mx ~all"
    
    pay attention to the log file :
    Code:
    ;dns_rdata_fromtext: mysite.org.db:10: near eol: unexpected end of input
    10 (numeric) means your error on line 10

    Regards, LQman.
    http://lqman.wordpress.com
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Remove the ; sign in line 10.
     
  4. lqman

    lqman New Member

    @ Falko
    In my opinion.
    The ; sign isn't counted, ; sign is only for comment.
    I found the error, and i have fixed it and rewrite configuration with bold font.

    @kkonline
    ns1.mysite.org. -> information about authoritative nameserver in your domain / zone.
    yourmailaddress.mysite.org. -> mail address domain administrator with special syntax (replace @ sign with . sign).
    eg :
    [email protected] = yourmailaddress.mysite.org
    [email protected] = lqman.ee.its.ac.id
     
  5. miki86

    miki86 New Member

    Hello
    Can anyone help me with this im stuck and i don't know where my error is.
    My reverse dns is not setup like it shuold be, i know this step is optional but i want to learn.

    /etc/named.conf
    Code:
    zone "Z.Y.X.in-addr.arpa" {
    	type master;
    	file "/var/named/Z.Y.X.in-addr.arpa.rev";
    	//allow-update { key “rndckey”; };
    };
    Z.Y.X.in-addr.arpa.rev
    Code:
    Z.Y.X.in-addr.arpa.	IN	SOA	ns1.example.com. webmaster.example.com (
            100	; serial
            30M	; refresh
            3600	; retry
            3W	; expiry
            38400 )		; minimum
    
    @       IN      NS      ns1.example.com.
    @       IN      NS      ns2.example.com.
    
    1.0.0.127.in-addr.arpa.	IN	PTR	binggo.example.com.
    This is the error im geting when trying to restart bind
    Code:
    Error in named configuration:
    zone example.com/IN: loaded serial 100
    dns_rdata_fromtext: /var/named/Z.Y.X.in-addr.arpa.rev:1: unexpected end of input
    zone Z.Y.X.in-addr.arpa/IN: loading master file /var/named/Z.Y.X.in-addr.arpa.rev: unexpected end of input
    _default/Z.Y.X.in-addr.arpa/IN: unexpected end of input
    Of course Z.Y.X is my reversed ip address.
     
  6. lqman

    lqman New Member

    maybe you can try this one.

    take a look at the bold characters.

    I assume that Z.Y.X.in-addr.arpa = 0.0.127.in-addr.arpa
    then, querying your dns server :
    for easier troubleshoot procces, you must pay attention to /var/log/syslog especially when restarting the named daemon / service
    if you have ccze installed, you get colorize output with
    I hope this can solve your error.
     
    Last edited: Nov 24, 2010
  7. miki86

    miki86 New Member

    Thank you for replaying.

    I tried changing my reverse zone file as you sugested and im still geting same error.

    sysolg, same error as i posted above:
    Code:
    ...in-addr.arpa.zone:1: unexpected end of input...
    1 is for line one right?
    I can't determine which line one is wrong, my named.conf or zone file :confused:
    When i comment out zone calling in my named.conf file everything goes smoothly.

    By the way i noticed some errors in log file, i dont know if they are related to bind:
    Code:
    Nov 24 11:54:14 server avahi-daemon[7428]: avahi-daemon 0.6.16 starting up.
    Nov 24 11:54:14 server avahi-daemon[7428]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
    Nov 24 11:54:14 server avahi-daemon[7428]: dbus_bus_get(): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    Nov 24 11:54:14 server avahi-daemon[7428]: WARNING: Failed to contact D-Bus daemon.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Yes.

    It's line 1 of the zone file.
     
  9. miki86

    miki86 New Member

    Yes but what's wrong with it?
    Code:
    Z.Y.X.in-addr.arpa.	IN	SOA	ns1.example.com. webmaster.example.com (
    Looks like the link permissions are not right, since i installed bind-chroot i cant change permission on that link, chown passed but again link owner group is root :confused:

    Any ideas?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Make your zonefile look as suggested in post #6.
     
  11. lqman

    lqman New Member

    miki, please read your config carefully...

    I try this in my server & works.

    /etc/bind/named.conf.local
    Code:
    zone "example.com" {
            type master;
            file "/etc/bind/forward";
    };
    
    zone "0.0.127.in-addr.arpa" {
            type master;
            file "/etc/bind/reverse";
    };
    /etc/bind/forward
    Code:
    $TTL    604800
    $ORIGIN example.com.
    @       IN      SOA     ns1.example.com.        webmaster.example.com. (
                    100 ; serial
                    30M ; refresh
                    3600 ; retry
                    3W ; expiry
                    38400 ) ; minimum
    
    @               IN      NS      ns1.example.com.
    @               IN      NS      ns2.example.com.
    
    ns1             IN      A       127.0.0.1
    ns2             IN      A       127.0.0.2
    
    bingo           IN      A       127.0.0.1
    bingoagain      IN      A       127.0.0.2
    /etc/bind/reverse
    Code:
    $TTL    604800
    $ORIGIN 0.0.127.in-addr.arpa.
    @       IN      SOA     ns1.example.com.        webmaster.example.com. (
                    100 ; serial
                    30M ; refresh
                    3600 ; retry
                    3W ; expiry
                    38400 ) ; minimum
    
    @       IN      NS      ns1.example.com.
    @       IN      NS      ns2.example.com.
    
    1       IN      PTR     bingo.example.com.
    2       IN      PTR     bingoagain.example.com.
    
    this is snippet of my /var/log/syslog when restarting bind service.
    Code:
    Nov 26 09:52:48 gw-blueoffice named[5933]: found 1 CPU, using 1 worker thread
    Nov 26 09:52:48 gw-blueoffice named[5933]: using up to 4096 sockets
    Nov 26 09:52:49 gw-blueoffice named[5933]: loading configuration from '/etc/bind/named.conf'
    Nov 26 09:52:49 gw-blueoffice named[5933]: using default UDP/IPv4 port range: [1024, 65535]
    Nov 26 09:52:49 gw-blueoffice named[5933]: using default UDP/IPv6 port range: [1024, 65535]
    Nov 26 09:52:49 gw-blueoffice named[5933]: no IPv6 interfaces found
    Nov 26 09:52:49 gw-blueoffice named[5933]: listening on IPv4 interface lo, 127.0.0.1#53
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 254.169.IN-ADDR.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 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.0.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty 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
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: D.F.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 8.E.F.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: 9.E.F.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: A.E.F.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: automatic empty zone: B.E.F.IP6.ARPA
    Nov 26 09:52:49 gw-blueoffice named[5933]: command channel listening on 127.0.0.1#953
    Nov 26 09:52:49 gw-blueoffice named[5933]: zone 0.in-addr.arpa/IN: loaded serial 1
    Nov 26 09:52:49 gw-blueoffice named[5933]: zone 127.in-addr.arpa/IN: loaded serial 1
    [B]Nov 26 09:52:49 gw-blueoffice named[5933]: zone 0.0.127.in-addr.arpa/IN: loaded serial 100[/B]
    Nov 26 09:52:49 gw-blueoffice named[5933]: zone 255.in-addr.arpa/IN: loaded serial 1
    [B]Nov 26 09:52:49 gw-blueoffice named[5933]: zone example.com/IN: loaded serial 100[/B]
    Nov 26 09:52:49 gw-blueoffice named[5933]: zone localhost/IN: loaded serial 2
    Nov 26 09:52:49 gw-blueoffice named[5933]: running
    [B]Nov 26 09:52:49 gw-blueoffice named[5933]: zone example.com/IN: sending notifies (serial 100)[/B]
    [B]Nov 26 09:52:49 gw-blueoffice named[5933]: zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 100)[/B]
    test resolving address forward & reverse
    Code:
    lqman@gw-blueoffice:~$ host ns1.example.com
    ns1.example.com has address 127.0.0.1
    lqman@gw-blueoffice:~$ host ns2.example.com
    ns2.example.com has address 127.0.0.2
    lqman@gw-blueoffice:~$ host bingo.example.com
    bingo.example.com has address 127.0.0.1
    lqman@gw-blueoffice:~$ host bingoagain.example.com
    bingoagain.example.com has address 127.0.0.2
    lqman@gw-blueoffice:~$ host 127.0.0.1
    1.0.0.127.in-addr.arpa domain name pointer bingo.example.com.
    lqman@gw-blueoffice:~$ host 127.0.0.2
    2.0.0.127.in-addr.arpa domain name pointer bingoagain.example.com.
    come on dude, be-carefully and be-patient with your configuration code.
    :)
     
  12. miki86

    miki86 New Member

    I already tried to configure my reverse zone file like yours and that didn't work.

    Like there is an error on $TTL 604800 :confused:
    Zone file is ok, i think, problem is somewhere else and im gonna leave it for now until i fugure it out.

    Thanks appreciate your help.
     
  13. rudini

    rudini New Member

    DNS it's not working

    Hi, i was installed bind9 in my server, but it didn't work.
    This is output below
    root@server1:/etc/bind/zones# dig pilihanmobil.net

    ; <<>> DiG 9.7.3 <<>> pilihanmobil.net
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 47375
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;pilihanmobil.net. IN A

    ;; AUTHORITY SECTION:
    net. 900 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1320638931 1800 900 604800 86400

    ;; Query time: 328 msec
    ;; SERVER: 202.134.0.155#53(202.134.0.155)
    ;; WHEN: Sun Nov 6 23:09:14 2011
    ;; MSG SIZE rcvd: 107

    content of pilihanmobil.net.db is:
    // replace example.com with your domain name. do not forget the . after the domain name!
    // Also, replace ns1 with the name of your DNS server
    example.com. IN SOA ns1.example.com. admin.example.com. (
    // Do not modify the following lines!
    2007031001
    28800
    3600
    604800
    38400
    )

    // Replace the following line as necessary:
    // ns1 = DNS Server name
    // mail = mail server name
    // example.com = domain name
    pilihanmobil.net. IN NS ns1.pilihanmobil.net.
    pilihanmobil.net. IN MX 10 mail.pilihanmobil.net.

    // Replace the IP address with the right IP addresses.
    www IN A 10.0.0.* // * is my server id
    mta IN A 10.0.0.*
    ns1 IN A 10.0.0.*

    Content of reverse is:
    //replace example.com with yoour domain name, ns1 with your DNS server name.
    // The number before IN PTR example.com is the machine address of the DNS server. in my case, it.s 1, as my IP address is 192.168.0.1.
    @ IN SOA server1.pilihanmobil.net. admin.pilihanmobil.net. (
    2007031001;
    28800;
    604800;
    604800;
    86400
    )

    IN NS server1.pilihanmobil.net.
    1 IN PTR pilihanmobil.net

    Content of named.conf is :

    //
    // Do any local configuration here
    //

    // Consider adding the 1918 zones here, if they are not used in your
    // organization
    //include "/etc/bind/zones.rfc1918";


    zone "pilihanmobil.net" {
    type master;
    file "/etc/bind/zones/db.pilihanmobil.net";
    };

    zone "0.0.0.10.in-addr.arpa" {
    type master;
    file "/etc/bind/rev.0.0.0.10.in-addr.arpa";
    };

    Please help me, why it didn't work ?
     
  14. lqman

    lqman New Member

    what is your log file says?

    watch your log file while restarting bind9.

    tail -f /var/log/syslog
     
  15. falko

    falko Super Moderator ISPConfig Developer

    Does
    Code:
    dig @localhost pilihanmobil.net
    work?

    Did you check your zone on
    Code:
    www.intodns.com
    ?
     
  16. kypdk

    kypdk New Member

    Hi


    $TTL 10800
    @ IN SOA ns1.xyz.com. postmaster.xyz.com. (
    2014062800 ;serial
    21600 ;refresh after 6 hours
    3600 ;retry after 1 hour
    604800 ;expire after 1 week
    86400 ) ;minimum TTL of 1 day
    @ 3600 IN A 46.235.13.161
    mail 86400 IN A 46.235.13.161
    ns1 172800 IN A 46.235.13.161
    ns2 172800 IN A 46.235.13.161
    www 3600 IN CNAME @
    ftp 3600 IN CNAME @
    @ 86400 IN MX 10 mail.xyz.com.
    @ 172800 IN NS ns1.xyz.com.
    @ 172800 IN NS ns2.xyz.com.

    @ 10800 IN TXT "v=spf1 a -all"
    _domainkey 10800 IN TXT "o=~; r=postmaster@<domain>"
    mail._domainkey 10800 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9zdEasOY4c7x7LEErMukLjlffoxO7XDwyM8MyTBBp3sR2LZ+lLKvBVU3MXe21L01BSfNcPz+ATazu8/Sv5AYlZj0pd9BjFRJDkKvexyE9GQNK5DPtg4AyBpO7+Pc1ORp18dqa8Tu2KMef9+nDvUgnjPNej6MTEGZseNe2zpHp1UrBDSGuIV0DhWtbJRy8KifXrGG3mvyF52+WQ9z+jUBV3Roh4eIwIDAQAB"
    _dmarc 10800 IN TXT "v=DMARC1; p=quarantine"

    check please
    22: syntax error
    how to fix
     
  17. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    At least your SPF, DKIM, DMARC and DomainKey-Record are wrong.
    For DKIM this should be something like mail._domainkey.example.com IN TXT ...
     

Share This Page