Maintained by: NLnet Labs

[Unbound-users] issue with pythonmodule

Tom Hendrikx
Fri Jul 22 01:39:40 CEST 2011


Hi,

When trying to add a python script to unbound, I receive some errors
(tested with both 1.4.10 and 1.4.12):

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named unboundmodule
[1311289662] unbound-checkconf[7398:0] error: pythonmod: cannot
initialize core module: unboundmodule.py
[1311289662] unbound-checkconf[7398:0] fatal error: bad config for
python module

Testing by hand gives a similar output:

$ sudo /usr/sbin/unbound -dv -c /etc/unbound/unbound.conf
[1311289789] unbound[7421:0] notice: Start of unbound 1.4.12.
[1311289789] unbound[7421:0] warning: increased limit(open files) from
1024 to 4152
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named unboundmodule

After some debugging I realised that unbound is unable to find the
unboundmodule.py file that is placed in
/usr/lib64/python2.7/site-packages. I was able to temporarily resolve
this by adding a symlink to the python file in /etc/unbound/, but this
is of course a hack.

Since the file is placed in /usr/lib64/python2.7/site-packages/ by the
Makefile, it looks as if there is no special adaption done by the distro
package. This is why I am asking my question here first ;)

Any ideas as to why this is not working out of the box?

--
Regards,
	Tom