[RADIATOR] Radiator and AuthLog SQL on Centos 7

Heikki Vatiainen hvn at open.com.au
Tue Dec 10 12:33:40 UTC 2019

On 05/12/2019 20.33, Ullfig, Roberto Alfredo wrote:
> We're converting our servers from Centos 6 to Centos 7. We do some 
> logging with:
>          <AuthLog SQL>
>                  DBSource        dbi:mysql...
> but the connection keeps failing:
> MySQL server has gone away

MySQL and Radiator's DB connections should work fine with CentOS 7 too. 
The message you indicates the DB server, or possibly a firewall between 
Radiator and the server, has closed or forced the connection to close. 
In this case Radiator should retry opening the connection and running 
the query again.

If it fails even after retries, it will log something like this:

Tue Dec 10 14:05:25 2019: ERR: Could not connect to any SQL database. 
Request is ignored. Backing off for 600 seconds

I'm not saying what you see is normal, but it might be worth checking if 
it successful after it detects the problem.

I think I've seen the above message in cases where the SQL connection is 
seldom uses and the DB server side is keen to remove idle connections. 
Sometimes a firewall between Radiator and DB has done something similar.

> We have the mysql odbc connector installed:
> mysql-connector-odbc-5.2.5-8.el7.x86_64

I think this is not used because you have not configured dbi:odbc:...
Your config snippet indicates it uses DBD::mysql which links directly to 
MySQL client libraries and uses SQL native, not ODBC, interface.

dbi:mysql:... is commonly used, and I think it should be stable and work 

> and up to date with mysql/mariadb:
> mariadb-5.5.64-1.el7.x86_64
> mariadb-libs-5.5.64-1.el7.x86_64
> Any ideas?

I would check the server side to see if it logs about why it closes 
connections. Radiator tries to keep a connection open to DB once it's 
established. Therefore there might be a mismatch in what Radiator does 
and what the server expects from the connections.


Heikki Vatiainen <hvn at open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, TACACS+, PAM, Active Directory,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, etc.

More information about the radiator mailing list