RadAcct Issue
Richard J Palmer
richard at merula.net
Wed Nov 3 21:03:18 CET 2021
Good Evening
I am seeing something slightly odd here with FreeRadius in some
situations.
for some (not not all) session closes on RadAcct we are seeing:
(142) sql1: SQL-User-Name set to 'myusername at myrealm'
(142) sql1: EXPAND EXECUTE radius.[dbo].[proc_RadacctUpdate_1] '%S',
'%{Acct-Session-Time}', '%{Acct-Input-Gigawords}',
'%{Acct-Input-Octets}', '%{Acct-Output-Gigawords}',
'%{Acct-Output-Octets}', '%{Acct-Terminate-Cause}',
'%{Acct-Delay-Time}', '%{Connect-Info}', '%{Acct-Session-Id}',
'%{NAS-IP-Address}'
(142) sql1: --> EXECUTE radius.[dbo].[proc_RadacctUpdate_1]
'2021-11-03 19:54:22', '2835', '0', '361059', '0', '357416',
'Lost-Carrier', '', '287000/396000', 'S600000269717108F60302',
'1.2.3.4'
(142) sql1: EXPAND /usr/local/var/log/radius/accounting.sql
(142) sql1: --> /usr/local/var/log/radius/accounting.sql
(142) sql1: Executing query: EXECUTE
radius.[dbo].[proc_RadacctUpdate_1] '2021-11-03 19:54:22', '2835',
'0', '361059', '0', '357416', 'Lost-Carrier', '', '287000/396000',
'S600000269717108F60302', '1.2.3.4'
(142) sql1: SQL query returned: success
(142) sql1: -1 record(s) updated
(142) sql1: No additional queries configured
rlm_sql (sql1): Released connection (21)
(142) [sql1] = noop
(142) [handled] = handled
(142) } # redundant = handled
(142) } # accounting = handled
(142) Not sending reply to client.
Note this is using MS SQL via TDS
As this is not seeing a positive return from the numbers of records
updated - then it does not reply to the NAS and so the NAS tries again
and again
Running the Query on the MS SQL server I see:
---
(1 row affected)
(1 row affected)
---
So it is correctly updating records - the stored procedure is safe as
long as it returns success.
1) Can you think why FreeRadius is getting -1 as a return.
2) Given the stored procedure will return an error IF it can't update
the data - is there anyway for us to tell FreeRadius to accept and
process OK as long as the Query works.
We are not seeing this for all queries - but just some - happy to add
as many details as needed here - and it's not pointing the blame at
Radius - just trying to understand the oddity for the future
Thanks in advance
Richard
More information about the Freeradius-Users
mailing list