Duplicate module "sql sql", in file /etc/freeradius/mods-enabled/sql

rajabu kitindi rkitindi at gmail.com
Mon Apr 5 13:17:05 CEST 2021


Thanks Alan

I had these settings in my /etc/freeradius/radiusd.conf file under modules
section.

        $INCLUDE mods-enabled/
        $INCLUDE mods-enabled/sql

This was a root cause. So I commented out $INCLUDE mods-enabled/sql to get
it going.

But this way doesn't seem to be working because I have configured a user
defined module   "chillispot_max_bytes" under instantiate section, and when
I run freeradius -X command, I get an error chillispot_max_bytes is an
unknown module. But actually an include statement at the end of
mods-enabled/sqlcounter including a file which contains this contains this
user-defined module. This is how I did it

$INCLUDE ${modconfdir}/sql/counter/mysql/chillispot.conf

When I  open, $INCLUDE ${modconfdir}/sql/counter/mysql/chillispot.conf I
have

sqlcounter chillispot_max_bytes {
counter_name = Max-Total-Octets
check_name = ChilliSpot-Max-Total-Octets
reply_name = ChilliSpot-Max-Total-Octets
reply_message = "You have reached your bandwidth limit"
sql_module_instance = sql
key = User-Name
reset = never
query = "SELECT IFNULL((SUM(AcctInputOctets + AcctOutputOctets)),0) FROM
radacct WHERE username = 'User-Name' AND UNIX_TIMESTAP(AcctStartTime) +
AcctSessionTime > '%%b'"
}

What would be your opinion, should I just create a chillispot_max_bytes
under /etc/freeradius/mods-enabled/?

Or if you have a working cheat sheet on how to integrate coovachilli with
freeradius, that will be appreciated too.

Thanks
Raj



On Sat, Mar 27, 2021 at 4:44 PM Alan DeKok <aland at deployingradius.com>
wrote:

> On Mar 27, 2021, at 9:34 AM, rajabu kitindi <rkitindi at gmail.com> wrote:
> > My config is just
> >
> > sql {
> >
> > }
>
>   Hmm... I suspect there's something more to it than that.
>
> > I downgraded to version 3.0.20 with same config and its working fine.
>
>   We test the SQL module on every code change, including every version
> that's released.
>
>   If you just do:
>
> $ cd raddb/mods-enabled
> $ ln -s ../mods-available/sql
>
>   And then run the server, it works.
>
>   So what else is going on?  What other changes have you made to your
> configuration?
>
>   Post the *full* debug output, including the exact error message.  It
> will tell you which files, and which line numbers have the duplicate
> modules.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html



-- 
MOTD: When we stop to think, we often miss our opportunity


More information about the Freeradius-Users mailing list