[Unbound-users] using python inside unbound

G g at notreal.eu
Fri Apr 23 10:09:26 UTC 2010


On Fri, 23 Apr 2010 08:22:57 +0200
"W.C.A. Wijngaards" <wouter at NLnetLabs.nl> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi G,
> 
> If you start unbound with -d, it does not daemonize, and stderr is not
> lost.  Python may print a traceback or other error to stderr.
> 
> Best regards,
>    Wouter
> 
> On 04/19/2010 07:30 PM, G wrote:
> > Hi,
> > 
> > I'm running unbound-1.4.3 on FreeBSD 8.0-RELEASE, amd64, and Python
> > 2.6.4.
> > I can't get the python example from here running:
> > http://www.unbound.net/documentation/pythonmod/examples/example3.html
> > 
> > I have the python bindings installed, and the py-unbound examples
> > work as expected.
> > 
> > Relevant configuration options:
> > module-config: "validator python iterator"
> > python:
> >         # Script file to load
> >         python-script: "/usr/local/etc/unbound/u.py" (which contains
> > example3 from the link above)
> > 
> > I get this in the log file:
> > unbound[67272:0] notice: init module 0: validator
> > unbound[67272:0] notice: init module 1: python
> > unbound[67272:0] error: pythonmod: cannot initialize core module:
> > unboundmodule.py unbound[67272:0] error: module init for module
> > python failed unbound[67272:0] fatal error: failed to setup modules
> > 
> > Does anyone have any ideas?
> > Thanks.

I get this:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named unboundmodule

However:
# ls -al /usr/local/lib/python2.6/site-packages/unboundmodule.py 
-rw-r--r--  1 root  wheel  67397 Apr 23
11:53 /usr/local/lib/python2.6/site-packages/unboundmodule.py



More information about the Unbound-users mailing list