bind-adblock
bind-adblock copied to clipboard
RNDC fails to reload when using multiple zones
I have multiple zones to split my cloud network domain from my home domain since I need some internal networks to use a public IP and others to use an internal IP. because of this, I have to specify the rpz blocklist in each zone.
I get the following error when running update-zones.py
rndc: 'reload' failed: multiple
zone 'block.ads.rpzlist' was found in multiple views
Traceback (most recent call last):
File "/root/bind-adblock/update-zonefile.py", line 288, in <module>
reload_zone(args.origin)
File "/root/bind-adblock/update-zonefile.py", line 215, in reload_zone
raise Exception('rndc failed with return code {}'.format(r))
Exception: rndc failed with return code 1
The workaround is to simply use "systemctl restart named", or "rndc reload". I'm not a programmer unfortunately, however it appears that the code to reload the server needs to reload all zones.
I was hitting the same issue, as a workaround you could edit the script from:
211 def reload_zone(origin):
212 cmd = ['rndc', 'reload', origin]
to
211 def reload_zone(origin):
212 cmd = ['rndc', 'reload']
Should be solved by #35