Instantiation of python module fails on 3.0.21

Christian Strauf strauf at rz.tu-clausthal.de
Thu Apr 16 08:04:53 CEST 2020


Hi all!

We've been running FreeRADIUS 3.0.20 successfully on several Ubuntu 18.04.4 LTS machines. We make use of the rlm_python module. We compile the packages according to

	https://wiki.freeradius.org/building/Debian-and-Ubuntu

For test purposes we install the packages on the same machine that we compile them on. We've recently built packages for FreeRADIUS 3.0.21, took the sample configuration that comes with it and modified it to our local needs (there were hardly any changes necessary between 3.0.20 and 3.0.21). However, when running version 3.0.21, "freeradius -X" gives us:

--------8<--------8<--------8<--------8<--------8<--------
[...]
  # Instantiating module "python" from file /etc/freeradius/mods-enabled/python
Python version: 2.7.17 (default, Nov  7 2019, 10:07:09)  [GCC 7.4.0]
<type 'exceptions.SystemError'> (null argument to internal routine)
/etc/freeradius/mods-enabled/python[9]: Instantiation failed for module "python"
--------8<--------8<--------8<--------8<--------8<--------

The python version mentioned is correct. Also, rlm_python.so is properly linked against the correct python version:

--------8<--------8<--------8<--------8<--------8<--------
# ldd rlm_python.so
	linux-vdso.so.1 (0x00007ffd10b5f000)
	libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007fcefce5e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcefca6d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fcefd5e3000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcefc850000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcefc631000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcefc42d000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fcefc22a000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcefbe8c000)
--------8<--------8<--------8<--------8<--------8<--------

To rule out configuration migration problems we installed the configuration that runs with version 3.0.20, tested it with 3.0.20, removed version 3.0.20 and installed packages for 3.0.21 while preserving the configuration that is verified to run. The result is the same, the instantiation of the python module fails for 3.0.21 while it works with the same configuration for 3.0.20.

As a workaround I was considering building rlm_python3, however, in the 3.0.21 it's not marked as stable in src/modules/stable and it doesn't build by default in the Debian/Ubuntu package build process without modifications. Would other FreeRADIUS admins recommend using rlm_python3?

Please let me know if more debugging info is needed. I ran an "strace" but other than the above error message it doesn't seem to yield more usable information. Thanks for your help!

Kind regards,
Christian Strauf
-- 
Dipl.-Math. Christian Strauf
Head of Network Services Department
Clausthal Univ. of Technology   E-Mail: strauf at rz.tu-clausthal.de
Rechenzentrum                   Web:    www.rz.tu-clausthal.de
Erzstra├če 18                    Tel.:   +49-5323-72-2086 Fax: -992086
D-38678 Clausthal-Zellerfeld

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5279 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20200416/9be7ec47/attachment.bin>


More information about the Freeradius-Users mailing list