Bind9 need to restart to propagate

Discussion in 'Server Operation' started by Esteka IT Solutions, Apr 3, 2017.

  1. Esteka IT Solutions

    Esteka IT Solutions New Member

    Hello,
    I have a strange problem with bind and DNS creation in a private server. I have recently set up my two dns name servers, ns1.hitekhost.net and ns2.hitekhost.net. Everything seems to work correctly but when I modifiy (create, edit or delete) new records the changes are not propagated until i force via /etc/init.d/bind9 restart , once I do this, changes are applied correctly and propagation succeeds.
    What can be wrong?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which Software do you use to manage the DNS records and which operating system?
     
  3. Esteka IT Solutions

    Esteka IT Solutions New Member

    I use ISPConfig 3's DNS manager in a Debian Jessie server with BIND9.
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Did you increase the serial in the zone, too?
     
  5. Esteka IT Solutions

    Esteka IT Solutions New Member

    I am not sure about that, but I do not think so. I just use the DNS manager in ISPConfig to add, modify or delete records. Shouldn't that be enough ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's enough. Maybe you have a problem with your systemd setup? When systemd is present, then ispconfig will use it to restart and reload services instead of the init script. So you should check if systemd is installed and if that's the case, test if a restart and reload of bind with systemd is working.
     
  7. Esteka IT Solutions

    Esteka IT Solutions New Member

    pidof systemd is null, so I guess it is not installed
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's no indication if it is isntalled or not. Test it with:

    which systemd

    if which returns a path, then systemd is installed and must be used to manage the system. If you don't want to use it, then remove it.
     
  9. Esteka IT Solutions

    Esteka IT Solutions New Member

    ok, so I did a which systemd and it returned /bin/systemd, therefor it is installed. Then I tried reloading the bind9 service with systemctl:
    systemctl restart bind.service
    systemctl status reported active and running.
    Finally
    tail -f /var/log/syslog
    and it logged some successful messages:
    reloading configuration succeeded
    reloading zones succeeded
    server reload successful
    etc..
    so it seems that everything worked, but when I dig from the outside it does not return the A record I just created :
    dig @ns1.hitekhost.net test.airean.info:
    ; <<>> DiG 9.8.3-P1 <<>> @ns1.hitekhost.net test.airean.info
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 59266
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available

    ;; QUESTION SECTION:
    ;test.airean.info. IN A

    ;; AUTHORITY SECTION:
    airean.info. 3600 IN SOA ns1.hitekhost.net. hostmaster.hitekhost.net. 2017040301 7200 540 1209600 3600

    ;; Query time: 39 msec
    ;; SERVER: 62.210.209.202#53(62.210.209.202)
    ;; WHEN: Mon Apr 3 18:26:36 2017
    ;; MSG SIZE rcvd: 98
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Stop bind with the init script, then start it with systemd and then try the same again. It might be that a service which has been started with method A can not be reloaded or restarted with Method B.
     
  11. Esteka IT Solutions

    Esteka IT Solutions New Member

    $ /etc/init.d/bind9 stop
    [ ok ] Stopping bind9 (via systemctl): bind9.service.
    $ systemctl start bind9.service
    Now dig @ns1.hitekhost.net test.airean.info resolves successfully but it was created before the restart, so I created a new A record test2, this is more or less the log I got:

    systemd[1]: Reloading BIND Domain Name Server.
    named[2922]: received control channel command 'reload'
    named[2922]: loading configuration from '/etc/bind/named.conf'
    named[2922]: reading built-in trusted keys from file '/etc/bind/bind.keys'
    named[2922]: using default UDP/IPv4 port range: [1024, 65535]
    sd-49057 named[2922]: using default UDP/IPv6 port range: [1024, 65535]
    sd-49057 named[2922]: sizing zone task pool based on 21 zones
    [...]
    named[2922]: reloading configuration succeeded
    named[2922]: reloading zones succeeded
    systemd[1]: Reloaded BIND Domain Name Server.
    rndc[2954]: server reload successful
    named[2922]: all zones loaded
    named[2922]: running
    ...
    but dig does not resolve test2.airean.info:
    $ dig @ns1.hitekhost.net test2.airean.info

    ; <<>> DiG 9.8.3-P1 <<>> @ns1.hitekhost.net test2.airean.info
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40394
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available

    ;; QUESTION SECTION:
    ;test2.airean.info. IN A

    ;; AUTHORITY SECTION:
    airean.info. 3600 IN SOA ns1.hitekhost.net. hostmaster.hitekhost.net. 2017040302 7200 540 1209600 3600

    ;; Query time: 100 msec
    ;; SERVER: 62.210.209.202#53(62.210.209.202)
    ;; WHEN: Mon Apr 3 18:45:23 2017
    ;; MSG SIZE rcvd: 99
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    uninstall systemd, then the init scripts will be used automatically.
     
  13. Esteka IT Solutions

    Esteka IT Solutions New Member

    Systemd removal is complaining:
    systemd is the active init system, please switch to another before removing systemd
    What do you recommend?
     
  14. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    btw: i get the IP using dig...
     
  15. Esteka IT Solutions

    Esteka IT Solutions New Member

    I know, I restarted bind9 a few times so it has propagated, the problem is that if I just modify any record (add, edit or delete) changes are not reflected until I force bind9 to restart
     

Share This Page