Setting up RADIUS to send accounting packets to multiple database servers simultaneously

Sea Gull seagull0044 at gmail.com
Wed Aug 10 08:55:23 UTC 2022


Hi Graham and Alan,

Thank you for your help. Setting "start = 0" and "read_clients = no"
allowed me to start RADIUS without the accounting DB being available.
Unfortunately, I thought that setting "read_clients = yes" will read from
the "clients.conf", in fact that is where I have set all my clients, as
rightly pointed out by Alan.

Thanks again.

Kind Regards,
SG

On Thu, Aug 4, 2022 at 2:40 PM Alan DeKok <aland at deployingradius.com> wrote:

> On Aug 4, 2022, at 5:11 AM, Sea Gull <seagull0044 at gmail.com> wrote:
> > Thank you for the information provided. I have tried it out and managed
> to
> > set up RADIUS to write accounting packets to both MySQL and PostgreSQL
> > Databases. However, with regards to having RADIUS restarting when these
> are
> > unavailable, I am still getting the below messages in debug, even though
> I
> > have set *start=0 *and it is now showing so. Is there maybe somewhere
> else
> > that I have to change apart from /etc/raddb/mods-enabled/sql please?
>
>   Please read the debug output:
>
> > ...
> > rlm_sql (sql_local): Processing generate_sql_clients
> > rlm_sql (sql_local) in generate_sql_clients: query is SELECT id, nasname,
> > shortname, type, secret, server FROM nas
> > rlm_sql (sql_local): 0 of 0 connections in use.  You  may need to
> increase
> > "spare"
> > rlm_sql (sql_local): Opening additional connection (0), 1 of 32 pending
> > slots used
> > rlm_sql_mysql: Starting connect to MySQL server
> > rlm_sql_mysql: Couldn't connect to MySQL server radius at localhost:radius
> > rlm_sql_mysql: MySQL error: Can't connect to local MySQL server through
> > socket '/var/lib/mysql/mysql.sock' (2)
>
>   You've set "read_clients = yes", but the SQL database is not available.
>
>   How do you propose to read the clients from SQL when SQL is down?
>
>   I have no idea why people make FreeRADIUS depend on an SQL database, and
> then insist that the SQL database is allowed to be randomly unavailable.
> That's just bad practice.
>
>   Your options are:
>
> a) make sure that SQL is up.
>
> b) put clients into "clients.conf", and set "read_clients = no"
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>


More information about the Freeradius-Users mailing list