FreeRadius 3.0.11 [bypassing MySQL failures]
Alan DeKok
aland at deployingradius.com
Mon Mar 4 15:30:02 CET 2019
On Mar 4, 2019, at 1:10 AM, Ibrahim Nezar Al-Mahfooz via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> We have two FR servers used to authorize LTE users based on their location
> and device type. We used unlang to meet the requirements and it worked
> pretty well. Inside the unlang blocks we have have different blocks to
> accept or reject users based on various conditions. For logging and
> reporting purposes, we have put the module sql inside this block as shown
> below. This setup works perfectly but until the mysql is down, users won't
> be able to authorize due to the module sql unable to proceed with the
> insert statement.
The general recommendation is to make sure that the DB stays up. FreeRADIUS can't do much without a database, so it's critical to keep the database up.
Even if you poked FreeRADIUS to work around this issue, it wouldn't solve the problem. FreeRADIUS still may take a while to determine that the DB is down
> ## The below is one example of post-auth section of sites-enabled/default
>
>
> *if (&3GPP-Charging-Characteristics == "0800") {update reply {Framed-Pool
> := "gnet-pool"Reply-Message := "Authorized"}*
>
>
> *-sqlaccept}*
> In the above case, users will be authorized based on the condition and then
> logged into sql and accepted.
>
> Would you be kind and suggest a working method or simple solution to bypass
> the sql module in case of mysql DB failures to avoid sacrificing our
> customers connectivity to the network in case of such incident?
https://wiki.freeradius.org/config/Fail%20over
Alan DeKok.
More information about the Freeradius-Users
mailing list