Execution of rlm code when remote server is not responding.

Arka Sharma arka.sharma1988 at gmail.com
Mon Oct 8 08:11:20 CEST 2012


On Thu, Sep 27, 2012 at 8:43 PM, Phil Mayers <p.mayers at imperial.ac.uk>wrote:

> On 27/09/12 12:32, Arka Sharma wrote:
>
>  Thanks a lot Phil for your reply.Now actually in my rlm code I want to
>> set a flag to mark the vent of server went down and invoke a java code
>> using JNI that is part of rlm.
>>
>
> Sorry, I don't understand that. Can you elaborate?
>
> It sounds like you have a custom module, written locally?
>
> Modules process packets. So you can't run module code in response to a
> "home server down" event (unless you emit a packet that your module
> responds to, I guess).
>
>
>  Can you please elaborate.I searched the file "trigger.conf" using "find
>> / -name trigger.conf" but did not get anything.Do I need to create it by
>> my own.
>>
>
> As I said, triggers are only available in the "master" git branch. They
> are not available in the releases code (2.1.x, 2.2.0).
>
> You will need to compile and install "master" to get triggers.
>
>
>  In the proxy.conf I have old style realm configuration.Ip's for
>> authorization and accounting hosts in the realm section.
>>
>
> Sorry, I don't understand why this is relevant.
>
>
>
>>     It's possible you could do something in the "post-proxy" section
>>     like so:
>>
>>     post-proxy {
>>        Post-Proxy-Type Fail {
>>        }
>>     }
>>
>> I was looking into default.original in sites-enabled for this.Can you
>> give me some examples for this ?
>>
>
> See:
>
> https://github.com/alandekok/**freeradius-server/blob/v2.1.x/**
> raddb/sites-available/robust-**proxy-accounting#L104<https://github.com/alandekok/freeradius-server/blob/v2.1.x/raddb/sites-available/robust-proxy-accounting#L104>
>
> You'll still need to find out which server is down, and this is what
> "radmin" does. I wouldn't bother with this post-proxy stuff - just write a
> cron job (although maybe you could trigger the cron job from post-proxy,
> for fast detection).
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/**
> list/users.html <http://www.freeradius.org/list/users.html>
>


Thanks a lot both Phil and Alan for your reply. Now let me put this
requirement straight. I have freeradius server running on my system which
takes request from NAS and send Access Request with PPAQ vsa for quota
update to PPS. PPS replies back with Access-Accept with the updated
quota.Now for error scenario's that PPS failed to respond,I have to handle
this scenario for example writing a log or setting a flag.Now I was trying
to download the master branch for triggers as you said but git is not
installed in this system, I was also tried with radmin but this involves
writing a cron. Now more specifically instead of server down I want to
detect the scenario when PPS failed to respond as Alan suggested and I want
to detect it in my rlm code.

Regards,
Arka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20121008/f75c2114/attachment.html>


More information about the Freeradius-Users mailing list