rlm_python works in -X, fatal signal when started using systemctl (pRet is NULL)
jonathan at prioritycolo.com
Fri Nov 19 17:01:44 CET 2021
Yes, the python script I wrote works when FreeRadius is run from the
console in debug, I am able to use the NAS and in the debug log I see my
authenticate method being called and the results returned. When I
upgraded to the latest, I messed things up I believe.
Other tasks took my attention and I haven't been able to follow up or
put work towards this until today, and hope to figure it out.
On 2021-11-16 12:34 p.m., Jorge Pereira wrote:
> Keep in mind to have a Python script similar to https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/modules/rlm_python3/example.py <https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/modules/rlm_python3/example.py>
>> On 13 Nov 2021, at 19:03, Jonathan Davis <jonathan at prioritycolo.com> wrote:
>> I have tried #'n out the func_detach, and tried return 0 following the example.py
>> Hadn't tried returning RLM_MODULE_OK which is a value of 2.
>> Either way, I am mid-upgrade but if it persists I'll check those examples and see whats new.
>> On 2021-11-13 4:03 p.m., Aren Sandersen via Freeradius-Users wrote:
>>> This might be as simple as adding a parameter to your detach() function in
>>> your Python code, or commenting it out the func_detach line entirely in
>>> Which fixes a bug in the sample code.
>>> Python 3.8.10
>>>> Ubuntu 20.04.3 LTS
>>>> FreeRADIUS 3.0.20
>>>> When I go to start freeradius with systemctl I get the following:
>>>> Job for freeradius.service failed because a fatal signal was delivered to
>>>> the control process.
>>>> See "systemctl status freeradius.service" and "journalctl -xe" for details.
>>>> in journalctl -xe I find:
>>>> Nov 13 16:28:51 radius-2.tor2 freeradius: # Skipping contents of
>>>> 'if' as it is always 'false' --
>>>> Nov 13 16:28:51 radius-2.tor2 freeradius: radiusd: #### Skipping
>>>> IP addresses and Ports ####
>>>> Nov 13 16:28:51 radius-2.tor2 freeradius: Configuration appears to
>>>> be OK
>>>> Nov 13 16:28:51 radius-2.tor2 freeradius: do_python_single:568,
>>>> detach - pRet is NULL
>>>> Nov 13 16:28:51 radius-2.tor2 freeradius: python_error_log:200,
>>>> Exception type: <class 'TypeError'>, Exception value: detach() takes 0
>>>> positional >
>>> 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