bind-adblock icon indicating copy to clipboard operation
bind-adblock copied to clipboard

RNDC fails to reload when using multiple zones

Open ACiDGRiM opened this issue 4 years ago • 1 comments

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.

ACiDGRiM avatar Aug 10 '21 03:08 ACiDGRiM

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']

cyberjoost avatar Oct 24 '21 09:10 cyberjoost

Should be solved by #35

Trellmor avatar May 15 '23 09:05 Trellmor