R: R: R: Common error on sql_counter on Ver 2.1.5

Mauro Iorio - Smart Soft s.r.l. m.iorio at smartsoft.it
Wed May 20 13:16:18 CEST 2009


> 
> No, group *membership* query (when I write membership, I do mean
> membership). Have you just copied queries from the old version without
> looking if anything has changed?
> 
> If you are upgrading from old version to a new one, which documentation
> should you follow - old or new? You opted for old, and are now wondering
> why things aren't working. It's no mistery to me. Use *new* documentation
> (user entries, sql queries, etc.). Configuration is largely compatible but
> things do change over years.
> 
> Ivan Kalik
> Kalik Informatika ISP
> 
> 

OK, I admit that reading the doc is *always* a fundamental step. But I've
read somewhere that configuration files for v 1.1.x should work also on
2.1.x. and so I was trying to migrate with minimal modifications.

Actually I was missing only the membership query that was not present in
1.1.x version of freeradius. 

So everything is working *except* the I've an error when counter retrieves
SUM(AcctSessionTime) from radacct.

Executing SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='mauro'
from SQL Server Management Studio gives me 294841 (Yes, that's a lot of
seconds, is a test user) while the output of radiusd -X is:

rlm_sql (sql): Reserving sql socket id: 3
query:  SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='mauro'
[sessioncounter] sql_xlat finished
rlm_sql (sql): Released sql socket id: 3
[sessioncounter]        expand: %{sql:SELECT SUM(AcctSessionTime) FROM
radacct W
HERE UserName='mauro'} -> 2948
rlm_sqlcounter: Check item is greater than query result
rlm_sqlcounter: Authorized user mauro, check_item=3600, counter=2948
rlm_sqlcounter: Sent Reply-Item for user mauro, Type=Session-Timeout,
value=652
++[sessioncounter] returns ok

That's' totally wrong since 294841 is much bigger than 3600 and not
smaller... And this happens with users from different groups and with
different SUM(AcctSessionTime). *Every* time SUM(AcctSessionTime) is bigger
than 9999 it looses the fifth digit of the response, better it looses every
digits after the fourth!!!

What am I missing??? (I'm going to write this to the newsletter too)

Anyway I thank You very much for Your interest in my problem and for
spending Your time on it.

Mauro Iorio.





More information about the Freeradius-Users mailing list