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?
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 ?
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.
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.
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.xxx.xxx.xxx#53(62.xxx.xxx.xxx) ;; WHEN: Mon Apr 3 18:26:36 2017 ;; MSG SIZE rcvd: 98
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.
$ /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.xxx.xxx.xxx#53(62.xxx.xxx.xxx) ;; WHEN: Mon Apr 3 18:45:23 2017 ;; MSG SIZE rcvd: 99
Systemd removal is complaining: systemd is the active init system, please switch to another before removing systemd What do you recommend?
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