Problems with rlm_sqlcounter

Tas Dionisakos tas at newman.unimelb.edu.au
Mon Feb 12 09:48:44 CET 2007


Alan,

The Freeradius is returning nothing because of the following SQL query "

SELECT SUM(AcctOutputOctets) FROM radacct where 
UserName='duler.peter'"

Because this user "peter.duler" has never logged in before there is no 
record of  his account in the radacct table, this is why it returns null.

I will re-create this situation tomorrow at work and insert a session of 
the user in the radacct table, this will show the result without the 
null statement.

I have spent alot of time on this problem and I am now 100% confident 
that its a variable somewhere that is causing the error.

Tas.


Alan DeKok wrote:
> Tas Dionisakos wrote:
>   
>> After many months of fault finding Im still in the dark about the 
>> counter not understanding values greater that 2 gigabytes.
>>     
>
>   The last message you sent me, and the debug log below, shows that the
> SQL database is returning NOTHING if the counter is more than 2G.
>
>   Please explain how "fixing" the counter module will make the SQL
> database return the value you need.  Again, right now it's returning
> NOTHING.
>
>   Update the SQL schema to handle numbers larger than 2G.  See the SQL
> documentation for how to do this.
>
>
>   
>> rlm_sql (sql): sql_set_user escaped user --> 'duler.peter'
>> radius_xlat: 'SELECT SUM(AcctOutputOctets) FROM radacct where 
>> UserName='duler.peter''
>> rlm_sql (sql): Reserving sql socket id: 3
>> rlm_sql (sql): row[0] returned NULL
>> rlm_sql (sql): Released sql socket id: 3
>> radius_xlat: ''
>> rlm_sqlcounter: (Check item - counter) is less than zero
>>     
>
>   Should I fix rlm_sqlcounter to print out a message saying "SQL module
> returned nothing.  Impossible to do any counting!"
>
>   Would that let you believe it's not a FreeRADIUS problem?
>
>   Alan DeKok.
> --
>   http://deployingradius.com       - The web site of the book
>   http://deployingradius.com/blog/ - The blog
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>   




More information about the Freeradius-Users mailing list