Deleting stale session automatically with unlang

Bishal Pun bishalpun at
Fri Jan 14 01:43:08 CET 2011

+Hi ,

 I am using freeradius 2.1.6 + mysql + LDAP for AAA in freebsd server. What
I want to do is, when my AP reboots or due to power failure clients login is
still seen there as online but the client is not able to do login. SO is it
possible to clear the stale session with unlang if the authentication
request come from same calling station id? I tried to do in
/etc/freeradius/sites-enable/default  authorize section

"%{sql: UPDATE radacct set AcctStopTime=ADDDATE(AcctStartTime,INTERVAL
AcctSessionTime SECOND), AcctTerminateCause='Clear-Stale Session' WHERE
UserName='%{User-Name}' and CallingStationId='%{Calling-Station-Id}' and
AcctStopTime is null}"

but it doesn't help me, giving me error like
Wed Jan 12 15:16:14 2011 : Error: rlm_sql_mysql: MYSQL Error: No Fields
Wed Jan 12 15:16:14 2011 : Error: rlm_sql_mysql: MYSQL error:
Wed Jan 12 15:16:14 2011 : Info: rlm_sql_mysql: Starting connect to MySQL
server for #4
Wed Jan 12 15:16:14 2011 : Error: rlm_sql (sql): failed after re-connect

any help?
thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Freeradius-Users mailing list