v3.2.x - installing rlm_python3 attempts to install rlm_python
Alan DeKok
aland at deployingradius.com
Tue Jul 19 13:15:15 UTC 2022
On Jul 19, 2022, at 8:58 AM, Dave Macias <davama at gmail.com> wrote:
>
> Yes did try to enable but radiusd crashes with below. Yes, example.py does
> exist...
A failure message is not a crash.
Describing things incorrectly makes it harder to fix problems.
> freeradius | Tue Jul 19 12:56:34 2022 : Debug: # Instantiating module
> "python3" from file /etc/raddb/mods-enabled/python3
> freeradius | Tue Jul 19 12:56:34 2022 : Info: Python version: 3.9.13 (main,
> May 18 2022, 02:37:36) [GCC 10.3.1 20211027]
> freeradius | Tue Jul 19 12:56:34 2022 : Error: python_function_load -
> Module 'example' not found
> Perhaps the way the module is loaded?
It's a python issue. Python needs a path set, so that it knows where to look for things.
> It's a volume:
>
> - ./raddb/sites-enabled/default:/etc/raddb/sites-enabled/default
> - ./raddb/mods-enabled/ldap:/etc/raddb/mods-enabled/ldap
> - ./raddb/mods-enabled/linelog:/etc/raddb/mods-enabled/linelog
> - ./raddb/mods-enabled/python3:/etc/raddb/mods-enabled/python3
> -
> ./raddb/mods-config/python3/webhook.py:/etc/raddb/mods-config/python3/webhook.py
So... how does python3 know to find things here? This directory doesn't exist in the default configuration.
Perhaps look into mods-available/python3, and see if there's some way to set a Python path. This is documented...
Perhaps you did set that, but it's impossible to tell. Because you helpfully deleted almost all of the debug output. And used -Xx, too, which all of the documentation says "don't do".
We write documentation and examples for a reason. They exist to help you. It helps to read them.
Alan DeKok.
More information about the Freeradius-Users
mailing list