Unexpected closed sessions in database

Marinko Tarlac mangia81 at gmail.com
Sat Feb 14 10:35:04 CET 2009


Hi friends.

I have small problem with freeradius and accounting (with database). 
Something is closing opened sessions and I can't see what is the reason. 
It seems that accounting_onoff_query was triggered by "something" and 
acctterminatecause field is empty so I don't see anything.

accounting_onoff_query = "\
          UPDATE ${acct_table1} \
          SET \
             acctstoptime       =  '%S', \
             acctsessiontime    =  unix_timestamp('%S') - \
                                   unix_timestamp(acctstarttime), \
             acctterminatecause =  '%{Acct-Terminate-Cause}', \
             acctstopdelay      =  '%{%{Acct-Delay-Time}:-0}', \
             vrijeme            =  '%S' \
           WHERE acctstoptime   =  0 \
#          WHERE acctstoptime IS NULL \
          AND nasipaddress      =  '%{NAS-IP-Address}' \
          AND acctstarttime     <= '%S'"

Session is still alive in NAS but just like I said, account. doesn't 
work. I'm using old sql schema so
WHERE acctstoptime IS NULL \
is commented and replaced with
WHERE acctstoptime   =  0 \

in sql.conf i set no for deletestalesessions because I don't need this 
function.

# Remove stale session if checkrad does not see a double login
deletestalesessions = no

FreeRadius is 2.1.3

Any ideas how to trace and solve this problem ?

Thanks



More information about the Freeradius-Users mailing list