Hi I am newbie in freeradius. Thank you for support. :) I have enabled sqlcounter in mods-enabled directory. When I debug freeradius -X Its giving this error including configuration file /etc/freeradius/3.0/mods-enabled/sqlcounter /etc/freeradius/3.0/mods-enabled/sqlcounter[43]: Reference "${modules.sql.dialect}" not found /etc/freeradius/3.0/mods-enabled/sqlcounter[52]: Reference "${modconfdir}/sql/counter/${dialect}/${.:instance}.conf" points to a variable which has not been expanded. Errors reading or parsing /etc/freeradius/3.0/radiusd.conf I have already tried method from this post. Found on mail list. If I changed in radiusd.conf then its saying duplicate sql module. https://github.com/FreeRADIUS/freeradius-server/commit/bb842ece01025e40906fe... Tried few method from mail list but none of them worked. What I am trying to do is change Mikrotik-Rate-Limit based on time by CoA. Thank you
On Mar 3, 2019, at 2:57 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
I have enabled sqlcounter in mods-enabled directory. When I debug freeradius -X
Its giving this error
including configuration file /etc/freeradius/3.0/mods-enabled/sqlcounter /etc/freeradius/3.0/mods-enabled/sqlcounter[43]: Reference "${modules.sql.dialect}" not found /etc/freeradius/3.0/mods-enabled/sqlcounter[52]: Reference "${modconfdir}/sql/counter/${dialect}/${.:instance}.conf" points to a variable which has not been expanded. Errors reading or parsing /etc/freeradius/3.0/radiusd.conf
I have already tried method from this post. Found on mail list. If I changed in radiusd.conf then its saying duplicate sql module.
https://github.com/FreeRADIUS/freeradius-server/commit/bb842ece01025e40906fe...
That only works if you use the code related to that commit. Download 3.0.18 and build / install it. Then use the above change. Alan DeKok.
Hi Alan, Thank you I fixed the sql error by putting mysql in sqlcounter dialect. Can you please tell me why this sql query is not working this one is working in debug mode I can see package id Tmp-Integer-0 := "%{sql:SELECT package FROM usersinfo WHERE username='%{User-Name}'}" but this one is not working, when I pass Tmp-Integer-0 as package ID its giving me blank/false. I searched google but no luck. Tmp-String-1 := "%{sql:SELECT 1dbstarttime FROM packages WHERE id='Temp-Integer-0'}" I need to store sql query value for checking in update coa . Thank you again :) On Tue, Mar 5, 2019 at 3:55 AM Alan DeKok <aland@deployingradius.com> wrote:
On Mar 3, 2019, at 2:57 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
I have enabled sqlcounter in mods-enabled directory. When I debug freeradius -X
Its giving this error
including configuration file /etc/freeradius/3.0/mods-enabled/sqlcounter /etc/freeradius/3.0/mods-enabled/sqlcounter[43]: Reference "${modules.sql.dialect}" not found /etc/freeradius/3.0/mods-enabled/sqlcounter[52]: Reference "${modconfdir}/sql/counter/${dialect}/${.:instance}.conf" points to a variable which has not been expanded. Errors reading or parsing /etc/freeradius/3.0/radiusd.conf
I have already tried method from this post. Found on mail list. If I changed in radiusd.conf then its saying duplicate sql module.
https://github.com/FreeRADIUS/freeradius-server/commit/bb842ece01025e40906fe...
That only works if you use the code related to that commit.
Download 3.0.18 and build / install it. Then use the above change.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Mar 5, 2019, at 6:29 AM, One Zero Art <onezeroartapps@gmail.com> wrote:
Thank you I fixed the sql error by putting mysql in sqlcounter dialect.
That works.
Can you please tell me why this sql query is not working
this one is working in debug mode I can see package id
Tmp-Integer-0 := "%{sql:SELECT package FROM usersinfo WHERE username='%{User-Name}'}"
but this one is not working, when I pass Tmp-Integer-0 as package ID its giving me blank/false. I searched google but no luck.
Tmp-String-1 := "%{sql:SELECT 1dbstarttime FROM packages WHERE id='Temp-Integer-0'}"
That's not how you refer to an attribute. See "man unlang", or the dozens of examples in the server. If you want to expand an attribute dynamically you need to use %{Tmp-Integer-0}. Alan DeKok.
participants (2)
-
Alan DeKok -
One Zero Art