Errors in configuring sqlcounter with FreeRADIUS

Alan DeKok aland at deployingradius.com
Thu Jun 21 15:02:16 CEST 2018


On Jun 21, 2018, at 8:34 AM, Rohith Asrk <rohith.asrk at gmail.com> wrote:
> I'm working on the django-freeradius project and trying to
> enforce session limits on users using the web interface. To accomplish that
> I'm using the rlm_sqlcounter module of FreeRADIUS.

  I saw that project.  It looks interesting and useful.

> When trying to configure sqlcounter module with FreeRADIUS I'm facing the
> errors as below.
> 
> including configuration file /etc/freeradius/mods-enabled/detail.log
> including configuration file /etc/freeradius/mods-enabled/ntlm_auth
> including configuration file /etc/freeradius/mods-enabled/attr_filter
> including configuration file /etc/freeradius/mods-enabled/detail
> including configuration file /etc/freeradius/mods-enabled/expiration
> including configuration file /etc/freeradius/mods-enabled/sqlcounter
> /etc/freeradius/mods-enabled/sqlcounter[43]: Reference
> "${modules.sql.dialect}" not found
> /etc/freeradius/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/radiusd.conf
> 
> I think FreeRADIUS is trying to load the sqlcounter module before sql
> module and therefore this errors. I've tried using the instantiate section
> as well but couldn't configure it properly.

  The "instantiate" section is for bootstrapping the modules.  It doesn't affect how they're loaded off of disk.

  The problem here is that the "sqlcounter" module is loaded from disk before the "sql" module.  That is due to how the files are laid out on disk, unfortunately.

  The solution is to change the "radiusd.conf" file.  Find the line which says:

$INCLUDE mods-enabled/

  And change it to include all of the modules, in order:

$INCLUDE mods-enabled/...
$INCLUDE mods-enabled/sql
$INCLUDE mods-enabled/sqlcounter
$INCLUDE mods-enabled/...

  It's annoying, but it will work.

  I'll see if this can be fixed in the next release.

  Alan DeKok.




More information about the Freeradius-Users mailing list