Hi Guys Got a problem with rlm_python using 1.1.7 on Debian etch with no changes to source other than to move rlm_python in to the stable modules file. The module is in the path and an strace shows the file being found. rlm_python:python_load_function: module 'radiusd_test' is not found rlm_python:EXCEPT:exceptions.ImportError: /usr/lib/python2.4/lib-dynload/time.so: undefined symbol: PyExc_IOError rlm_python:python_load_function: failed to import python function 'radiusd_test.instantiate' radiusd.conf[1]: python: Module instantiation failed. Anyidea would be great Thanks Mike ------- File is found and loaded open("/usr/lib/python2.4/site-packages/radiusd_test.py", O_RDONLY|O_LARGEFILE) = 5 fstat64(5, {st_mode=S_IFREG|0644, st_size=497, ...}) = 0 open("/usr/lib/python2.4/site-packages/radiusd_test.pyc", O_RDONLY|O_LARGEFILE) = 6 fstat64(6, {st_mode=S_IFREG|0644, st_size=1408, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7b67000 read(6, "m\362\r\n<\365\1Gc\0\0\0\0\0\0\0\0\1\0\0\0@\0\0\0s[\0\0"..., 4096) = 1408 fstat64(6, {st_mode=S_IFREG|0644, st_size=1408, ...}) = 0 read(6, "", 4096) = 0 close(6) = 0 munmap(0xb7b67000, 4096) ------ = 0 stat64("/usr/lib/python24.zip/time", 0xbfa8422c) = -1 ENOENT (No such file or directory) open("/usr/lib/python24.zip/time.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python24.zip/timemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python24.zip/time.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python24.zip/time.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64("/usr/lib/python2.4/time", 0xbfa8422c) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/time.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/timemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/time.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/time.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64("/usr/lib/python2.4/plat-linux2/time", 0xbfa8422c) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/plat-linux2/time.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/plat-linux2/timemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/plat-linux2/time.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/plat-linux2/time.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64("/usr/lib/python2.4/lib-tk/time", 0xbfa8422c) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/lib-tk/time.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/lib-tk/timemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/lib-tk/time.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/lib-tk/time.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64("/usr/lib/python2.4/lib-dynload/time", 0xbfa8422c) = -1 ENOENT (No such file or directory) open("/usr/lib/python2.4/lib-dynload/time.so", O_RDONLY|O_LARGEFILE) = 6 fstat64(6, {st_mode=S_IFREG|0644, st_size=15860, ...}) = 0 open("/usr/lib/python2.4/lib-dynload/time.so", O_RDONLY) = 7 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\22\0"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0644, st_size=15860, ...}) = 0 mmap2(NULL, 19072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0xb79a6000 mmap2(0xb79a9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x2) = 0xb79a9000 close(7) = 0 munmap(0xb79a6000, 19072) = 0 close(6) = 0 close(5) = 0 futex(0x8010a620, FUTEX_WAKE, 1) = 0 time(NULL) = 1191313703 write(1, "rlm_python:python_load_function:"..., 68rlm_python:python_load_function: module 'radiusd_test' is not found ) = 68 futex(0x801083f8, FUTEX_WAKE, 1) = 0 time(NULL) = 1191313703 write(1, "rlm_python:EXCEPT:exceptions.Imp"..., 114rlm_python:EXCEPT:exceptions.ImportError: /usr/lib/python2.4/lib-dynload/time.so: undefined symbol: PyExc_IOError ) = 114 futex(0x801083f8, FUTEX_WAKE, 1) = 0 time(NULL) = 1191313703 write(1, "rlm_python:python_load_function:"..., 93rlm_python:python_load_function: failed to import python function 'radiusd_test.instantiate' ) = 93 futex(0x801083f8, FUTEX_WAKE, 1) = 0 futex(0x801083f8, FUTEX_WAKE, 1) = 0 futex(0x801083f8, FUTEX_WAKE, 1) = 0 time(NULL) = 1191313703 write(1, "radiusd.conf[1]: python: Module "..., 55radiusd.conf[1]: python: Module instantiation failed. ) = 55 munmap(0xb7f81000, 4096) = 0 exit_group(1) = ? Process 23416 detached
Mike O'Connor wrote:
Got a problem with rlm_python using 1.1.7 on Debian etch with no changes to source other than to move rlm_python in to the stable modules file.
The module is in the path and an strace shows the file being found.
Is radiusd.py in the path? Alan DeKok.
Hi Guys I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code. Mike write(1, "exceptions.ImportError: /usr/lib"..., 97exceptions.ImportError: /usr/lib/python2.4/lib-dynload/time.so: undefined symbol: PyExc_IOError ) = 97 write(1, "Failed to import python module \""..., 47Failed to import python module "radiusd_test" ) = 47 write(1, "/etc/freeradius/rlmpython.conf[1"..., 76/etc/freeradius/rlmpython.conf[1]: Instantiation failed for module "python" ) = 76 write(1, "/etc/freeradius/sites-enabled/de"..., 76/etc/freeradius/sites-enabled/default[126]: Failed to find module "python". ) = 76 write(1, "/etc/freeradius/sites-enabled/de"..., 79/etc/freeradius/sites-enabled/default[35]: Failed to parse authorize section. ) = 79 write(1, " }\n", 3 } ) = 3 write(1, "}\n", 2} ) = 2 write(1, "Errors setting up modules\n", 26Errors setting up modules ) = 26 exit_group(1) = ? Process 1212 detached
Mike O'Connor wrote:
I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code.
I suspect it's a shared library problem. The time.so library depends on another one that contains PyExc_IOError. However, that dependency is NOT recorded in time.so. That dependency is also NOT built into FreeRADIUS (or rlm_python), as it as no idea which Python library depends on which other Python library. I suggesting finding out out which library contains that symbol, and then re-building rlm_python to link to that library. Alan DeKok.
Hi All I have look at this problem and I can not see how to fix it How much is it going to cost me to have someone login to a virtual machine I'll setup and fix this issue ASAP ? The fix would need to be done in such away that the standard Debian build scripts would be used and the patch sent back to the project. I'll like the patch for both 1.1.x and for current head. If someone is interested please contact me privately. Thanks Mike Alan DeKok wrote:
Mike O'Connor wrote:
I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code.
I suspect it's a shared library problem. The time.so library depends on another one that contains PyExc_IOError. However, that dependency is NOT recorded in time.so. That dependency is also NOT built into FreeRADIUS (or rlm_python), as it as no idea which Python library depends on which other Python library.
I suggesting finding out out which library contains that symbol, and then re-building rlm_python to link to that library.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi All I'm happy to say I have fixed this issue. I'm not totally happy with the way I did it because it would not be portable if python was installed a different location. If some with a little more knowledge could add this correctly that would be great. # # $Id: Makefile.in,v 1.2.10.1 2006/02/10 19:47:17 nbk Exp $ # TARGET = @targetname@ SRCS = rlm_python.c HEADERS = /usr/include/python2.4/pyerrors.h <----- RLM_LIBS = @python_ldflags@ RLM_CFLAGS = @python_cflags@ include ../rules.mak $(LT_OBJS): $(HEADERS) Mike Mike O'Connor wrote:
Hi All
I have look at this problem and I can not see how to fix it
How much is it going to cost me to have someone login to a virtual machine I'll setup and fix this issue ASAP ?
The fix would need to be done in such away that the standard Debian build scripts would be used and the patch sent back to the project.
I'll like the patch for both 1.1.x and for current head.
If someone is interested please contact me privately.
Thanks Mike
Alan DeKok wrote:
Mike O'Connor wrote:
I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code.
I suspect it's a shared library problem. The time.so library depends on another one that contains PyExc_IOError. However, that dependency is NOT recorded in time.so. That dependency is also NOT built into FreeRADIUS (or rlm_python), as it as no idea which Python library depends on which other Python library.
I suggesting finding out out which library contains that symbol, and then re-building rlm_python to link to that library.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi All Again I have not fixed it, with all the playing around with FreeRadius versions I had not got rlm_python loading when I believed I had fixed it. Mike :( Mike O'Connor wrote:
Hi All
I'm happy to say I have fixed this issue.
I'm not totally happy with the way I did it because it would not be portable if python was installed a different location.
If some with a little more knowledge could add this correctly that would be great.
# # $Id: Makefile.in,v 1.2.10.1 2006/02/10 19:47:17 nbk Exp $ #
TARGET = @targetname@ SRCS = rlm_python.c HEADERS = /usr/include/python2.4/pyerrors.h <----- RLM_LIBS = @python_ldflags@ RLM_CFLAGS = @python_cflags@
include ../rules.mak
$(LT_OBJS): $(HEADERS)
Mike
Mike O'Connor wrote:
Hi All
I have look at this problem and I can not see how to fix it
How much is it going to cost me to have someone login to a virtual machine I'll setup and fix this issue ASAP ?
The fix would need to be done in such away that the standard Debian build scripts would be used and the patch sent back to the project.
I'll like the patch for both 1.1.x and for current head.
If someone is interested please contact me privately.
Thanks Mike
Alan DeKok wrote:
Mike O'Connor wrote:
I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code.
I suspect it's a shared library problem. The time.so library depends on another one that contains PyExc_IOError. However, that dependency is NOT recorded in time.so. That dependency is also NOT built into FreeRADIUS (or rlm_python), as it as no idea which Python library depends on which other Python library.
I suggesting finding out out which library contains that symbol, and then re-building rlm_python to link to that library.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi Alan You are correct about it being an issue with time.so, because I just removed this module from my test code and added the module random instead and the freeradius loaded. Mike Alan DeKok wrote:
Mike O'Connor wrote:
I decided to try freeradius-2.0.0-pre2 and its give a much clear idea of the problem. The issue seems to be that the rlm_python module is having trouble loading dynamic code.
I suspect it's a shared library problem. The time.so library depends on another one that contains PyExc_IOError. However, that dependency is NOT recorded in time.so. That dependency is also NOT built into FreeRADIUS (or rlm_python), as it as no idea which Python library depends on which other Python library.
I suggesting finding out out which library contains that symbol, and then re-building rlm_python to link to that library.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
Alan DeKok -
freeradius@pineview.net -
Mike O'Connor