Setting up RADIUS to send accounting packets to multiple database servers simultaneously
aland at deployingradius.com
Thu Aug 4 12:39:55 UTC 2022
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
> 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"
More information about the Freeradius-Users