v3.2.x - installing rlm_python3 attempts to install rlm_python

Dave Macias davama at gmail.com
Tue Jul 19 22:59:50 UTC 2022


Thank you Jorge.
Yes, setting the PYTHONPATH was what resolved it.
Thank you for your assistance!

Best,
Dave
On Jul 19, 2022, 6:58 PM -0400, Jorge Pereira <jpereira at freeradius.org>, wrote:
> Please,
>
> 1. Check where is the example.py
>
> e.g: find / -name example.py
>
> 2. Then, set the “python_path=/etc/raddb/…” in /etc/raddb/mods-available/python3
>
> 3. Restart the server
>
> > On 19 Jul 2022, at 09:58, Dave Macias <davama at gmail.com> wrote:
> >
> > Yes did try to enable but radiusd crashes with below. Yes, example.py does
> > exist...
> >
> > 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
> > freeradius | Tue Jul 19 12:56:34 2022 : Error: python_error_log:209,
> > Exception type: <class 'ModuleNotFoundError'>, Exception value: No module
> > named 'example'
> > freeradius | Tue Jul 19 12:56:34 2022 : Error: python_function_load -
> > Failed to import python function 'example.instantiate'
> > freeradius | Tue Jul 19 12:56:34 2022 : Error: python_error_log:201,
> > Unknown error
> > freeradius | Tue Jul 19 12:56:34 2022 : Error:
> > /etc/raddb/mods-enabled/python3[9]: Instantiation failed for module
> > "python3"
> >
> > Perhaps the way the module is loaded?
> >
> > 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
> >
> >
> > On Tue, Jul 19, 2022 at 8:55 AM Alan DeKok <aland at deployingradius.com>
> > wrote:
> >
> > > On Jul 19, 2022, at 8:48 AM, Dave Macias <davama at gmail.com> wrote:
> > > > Still getting errors, unfortunately... using docker image
> > >
> > > Errors?
> > >
> > > > CC src/modules/rlm_python3/rlm_python3.c
> > > > src/modules/rlm_python3/rlm_python3.c:1033:1: warning: 'visibility'
> > >
> > > warning
> > >
> > > > src/modules/rlm_python3/rlm_python3.c:1136:3: warning:
> > > 'PyEval_InitThreads'
> > >
> > > warning
> > >
> > > "warning != error". What's the problem?
> > >
> > > Did you try the module to see if it worked?
> > >
> > > 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
>
> Jorge Pereira
> jpereira at networkradius.com
>
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list