python unbound issues

Spike Morelli (DRBA) spike at
Mon Feb 22 22:47:51 UTC 2016

thank you all for the prompt reply.

And thank you Robert for pointing me to that bug, it sure looks like it.

any idea about the caching issue?

I can't understand from the docs if responses are supposed to be
cached or not. It would seem nice if it did to save the overhead of running
the python script every time, but I can't figure out how to make that

fwiw domains that are resolved by the iterator are correctly cached as far
as I can see from the logs. In case my DNSMessage matters here's the bit
where I create the response (I'm forcing nossl google searches):

  if qdn == '':
      #create instance of DNS message (packet) with given parameters
      msg = DNSMessage(qdn, RR_TYPE_A, RR_CLASS_IN, PKT_QR | PKT_RA |
      #append RR
      if (qstate.qinfo.qtype == RR_TYPE_A) or (qstate.qinfo.qtype ==
        msg.answer.append('%s 3600 IN CNAME' % qdn)
        msg.answer.append(' 86400 IN A')
      set_msg_and_cache(qstate, msg, id)
      return True
      #pass the query to validator
      qstate.ext_state[id] = MODULE_WAIT_MODULE
      return True

the script is otherwise as per stock example:

thanks again for all the support,


On Mon, Feb 22, 2016 at 2:24 PM, Robert Edmonds <edmonds at> wrote:

> Spike Morelli (DRBA) via Unbound-users wrote:
> > 1) unbound-checkconfig complains that the python module isn't there:
> >
> > [1456179172] unbound-checkconf[5330:0] fatal error: module conf 'python
> > iterator' is not known to work
> >
> > looking at the source code this seems to be due to WITH_PYTHONMODULE not
> > being set, but I'm not sure where that's not happening. any clue?
> Hi, Spike:
> The Ubuntu unbound package is closely based on the Debian version. In
> this case, you're affected by bug #777193:
> unbound-checkconf is only called in certain cases by the init script.
> You might be able to work around the issue by altering some of the
> package settings. Maybe try setting RESOLVCONF=false in
> /etc/default/unbound, if you don't need the resolvconf integration.
> --
> Robert Edmonds
> edmonds at

Spike / Chin Jr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Unbound-users mailing list