Maintained by: NLnet Labs

[Unbound-users] Problems with pythonmodule (versions 1.4.4 and 1.4.5)

Leandro
Mon Jul 12 19:30:47 CEST 2010


Hi all,

Trying with both unbound-1.4.4 and unbound-1.4.5, I've got different  
problems when enable python modules. In both cases, configuration is  
done --with-pythonmodule, and set unbound.conf as follows:

         module-config: "validator python iterator"

         python-script: "/usr/local/etc/unbound/e1.py"
	
	#where e1.py is the same as http://www.unbound.net/documentation/pythonmod/examples/example0.html 
  (Fundamentals)

I'm lost here! Could you please lend me a hand?

Please find history below with both versions.

Tkx!
Leandro.


Doing it in unbound-1.4.4:

[root at rhel54ca-vm5 unbound-1.4.4]# ./unbound -dvv
[1278947428] unbound[1406:0] notice: Start of unbound 1.4.4.
[1278947428] unbound[1406:0] debug: creating udp4 socket 0.0.0.0 53
[1278947428] unbound[1406:0] debug: creating tcp4 socket 0.0.0.0 53
[1278947428] unbound[1406:0] debug: creating tcp4 socket 0.0.0.0 953
[1278947428] unbound[1406:0] debug: setup SSL certificates
[1278947428] unbound[1406:0] warning: did not exit gracefully last  
time (1384)
[1278947428] unbound[1406:0] debug: drop user privileges, run as unbound
[1278947428] unbound[1406:0] debug: switching log to /tmp/unbound.log
Traceback (most recent call last):
   File "<string>", line 1, in ?
ImportError: No module named unboundmodule

If I copy unboundmodule.py, from pythonmod directory to <unbound-home>:

[root at rhel54ca-vm5 unbound-1.4.4]# ./unbound -dvv
[1278947480] unbound[1424:0] notice: Start of unbound 1.4.4.
[1278947480] unbound[1424:0] debug: creating udp4 socket 0.0.0.0 53
[1278947480] unbound[1424:0] debug: creating tcp4 socket 0.0.0.0 53
[1278947480] unbound[1424:0] debug: creating tcp4 socket 0.0.0.0 953
[1278947480] unbound[1424:0] debug: setup SSL certificates
[1278947480] unbound[1424:0] warning: did not exit gracefully last  
time (1406)
[1278947480] unbound[1424:0] debug: drop user privileges, run as unbound
[1278947480] unbound[1424:0] debug: switching log to /tmp/unbound.log
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File "./unboundmodule.py", line 46, in ?
     class query_info(_object):
   File "./unboundmodule.py", line 58, in query_info
     if _newclass:qtype_str = _swig_property(_get_qtype_str)
NameError: name '_swig_property' is not defined

Finally, in unbound-1.4.5

[root at rhel54ca-vm5 unbound-1.4.5]# ./unbound -dvv
[1278955339] unbound[1698:0] notice: Start of unbound 1.4.5.
[1278955339] unbound[1698:0] debug: creating udp4 socket 0.0.0.0 53
[1278955339] unbound[1698:0] debug: creating tcp4 socket 0.0.0.0 53
[1278955339] unbound[1698:0] debug: creating tcp4 socket 0.0.0.0 953
[1278955339] unbound[1698:0] debug: setup SSL certificates
[1278955339] unbound[1698:0] warning: did not exit gracefully last  
time (1682)
[1278955339] unbound[1698:0] debug: drop user privileges, run as unbound
[1278955339] unbound[1698:0] debug: switching log to /tmp/unbound.log

Looking at the log:

[1278955339] unbound[1698:0] debug: module config: "validator python  
iterator"
[1278955339] unbound[1698:0] error: Unknown value for next module: '  
python iterator'
[1278955339] unbound[1698:0] fatal error: failed to setup modules

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://unbound.nlnetlabs.nl/pipermail/unbound-users/attachments/20100712/65eb2e83/attachment.htm>