Using the authenticate function on rlm_python

Francis Augusto Medeiros-Logeay r_f at med-lo.eu
Sat Nov 16 20:56:47 UTC 2024



> On 16 Nov 2024, at 15:10, Francis Augusto Medeiros-Logeay via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> 
> 
> __
> Francis Augusto Medeiros-Logeay
> Oslo, Norway
> Sent from a mobile device / Enviado a partir de dispositivo móvel
> 
>> On 16 Nov 2024, at 14:51, Alan DeKok <aland at deployingradius.com> wrote:
>> 
>> On Nov 16, 2024, at 4:53 AM, Francis Augusto Medeiros-Logeay <r_f at med-lo.eu> wrote:
>>> I was, but I also tested with running radiusd as a service. Got the same results. Somehow the python module is blocking other threads
>> 
>> The Python interpreter has a global lock (GIL).  So I suspect that's it.
> 
> Yup, I’ve seen that in the past people mentioned that. 
> 
> 
>>> Is there a special way to do it? What I do is that I send two authenticate requests, and see at the second never gets processed until the first one returns something to the client.
>> 
>> See radiusd.conf, "thread pool"
>> 
>> If Python doesn't work, maybe try Perl.
> 
> To be honest, I was thinking of biting the bullet and do it with a combination of unlang and rest and using exec in bash for polling the server. 
> 
> Would you recommend this approach instead of doing it in Perl?


Just an add on:

I tried Perl. It worked pretty well with concurrent threads. I’d like to try with the rest module as well (I started another thread about it), though. But at least I know that the problem I was facing is due python and that with Perl I get the functionality I was looking for.

Thanks a lot for the help along the way!

Best,

Francis 


More information about the Freeradius-Users mailing list