Problem with rml_sqlcounter with GigaByte datavolume
nfourel
nicolas.fourel at adipsys.com
Wed Sep 14 14:23:18 CEST 2011
The « check_item=0 » is reason why I posted my messages on this ML. If I put a value lesser than 2^32 (for example 1000000) for “Max-Input-Octets” in radcheck for username ‘foo at bar.com’, everything is ok, check_item has the good value. If I put value bigger than 2^32, check_item is always equal to 0.
Any idea ?
Thanks
Nicolas
De : Suman Dash [via FreeRadius] [mailto:ml-node+s1045715n4801896h94 at n5.nabble.com]
Envoyé : mercredi 14 septembre 2011 09:43
À : nfourel
Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume
check_item=0 , See why Max-Input-Octets is returned as 0 .
On Wed, Sep 14, 2011 at 12:55 PM, nfourel <[hidden email]> wrote:
Hi,
Here is the result of the SQL Query :
SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=0> ';
SUM(AcctInputOctets)
68882
And freeradius log for the counter section :
Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: Entering module authorize code
Wed Sep 14 09:17:45 2011 : Debug: WARNING: Please replace '%k' with '${key}'
Wed Sep 14 09:17:45 2011 : Debug: sqlcounter_expand: 'SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='%{User-Name}''
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='%{User-Name}' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=1> '
Wed Sep 14 09:17:45 2011 : Debug: WARNING: Please replace '%S' with '${sqlmod-inst}'
Wed Sep 14 09:17:45 2011 : Debug: sqlcounter_expand: '%{sql:SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=2> '}'
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_xlat
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: %{User-Name} -> [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=3>
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : sql_set_user escaped user --> '[hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=4> '
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=5> ' -> SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=6> '
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets: expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/radius/sqltrace.sql
Wed Sep 14 09:17:45 2011 : Debug: rlm_sql (sql): Reserving sql socket id: 0
Wed Sep 14 09:17:45 2011 : Debug: rlm_sql_mysql: query: SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=7> '
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets: sql_xlat finished
Wed Sep 14 09:17:45 2011 : Debug: rlm_sql (sql): Released sql socket id: 0
Wed Sep 14 09:17:45 2011 : Info: (0) totalinputoctets : expand: %{sql:SELECT SUM(AcctInputOctets) FROM radacct WHERE [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=8> '} -> 68882
Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: (Check item - counter) is less than zero
Wed Sep 14 09:17:45 2011 : Debug: rlm_sqlcounter: Rejected user [hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=9> , check_item=0, counter=68882
Any idea ?
Thanks for your help
Nicolas
De : Suman Dash [via FreeRadius] [mailto:[hidden email] <http://user/SendEmail.jtp?type=node&node=4801856&i=10> ]
Envoyé : mardi 13 septembre 2011 19:44
À : nfourel
Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume
SELECT SUM(AcctInputOctets) FROM radacct WHERE UserName='username'
Run the above query in mysql and post the result
then post the freeradius log specific to this section.
On Tue, Sep 13, 2011 at 10:00 PM, Nicolas FOUREL <[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=0> > wrote:
Hi Arran,
I have get version 3.0.0 with 64 bit counters support from Git and installed
it. Unfortunatly, I still have the same problem with my sql counter which
has always "check_item=0" when I put a value bigger than 2^32. On
Access-Request in debug mode, I have the following lines :
Tue Sep 13 18:20:47 2011 : Debug: rlm_sqlcounter: (Check item - counter) is
less than zero
Tue Sep 13 18:20:47 2011 : Debug: rlm_sqlcounter: Rejected user [hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=1> ,
check_item=0, counter=68882
Here is my counter definition :
sqlcounter totalinputoctets {
counter-name = Total-Max-Input-Octets
check-name = Max-Input-Octets
reply-name = ChilliSpot-Max-Input-Octets
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT SUM(AcctInputOctets) FROM radacct WHERE
UserName='%{%k}'"
}
I have added "Max-Input-Octets" in the dictionary file like that :
ATTRIBUTE Max-Input-Octets 3001 integer64
In radcheck table:
[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=2> Max-Input-Octets :=
107374182400
Did I miss a thing ?
Many thanks
Nicolas
-----Message d'origine-----
De :
freeradius-users-bounces+nicolas.fourel=[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=3>
[mailto:[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=4> =[hidden email] <http://user/SendEmail.jtp?type=node&node=4799383&i=5>
.org] De la part de Arran Cudbard-Bell
Envoyé : lundi 12 septembre 2011 11:46
À : FreeRadius users mailing list
Objet : Re: Problem with rml_sqlcounter with GigaByte datavolume
On 12 Sep 2011, at 10:20, nfourel wrote:
> Thanks for your reply but I can't find any version 3.x.x of freeRADIUS.
Where
> can I find it ?
>
click here.
_____
View this message in context: RE: Problem with rml_sqlcounter with GigaByte datavolume <http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4801856.html>
Sent from the FreeRadius - User mailing list archive <http://freeradius.1045715.n5.nabble.com/FreeRadius-User-f2740693.html> at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
_____
If you reply to this email, your message will be added to the discussion below:
http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4801896.html
To unsubscribe from Problem with rml_sqlcounter with GigaByte datavolume, click here <http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4455164&code=bmljb2xhcy5mb3VyZWxAYWRpcHN5cy5jb218NDQ1NTE2NHwtNTg2MjUyMTkw> .
--
View this message in context: http://freeradius.1045715.n5.nabble.com/Problem-with-rml-sqlcounter-with-GigaByte-datavolume-tp4455164p4802561.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110914/ea8d82bd/attachment.html>
More information about the Freeradius-Users
mailing list