No luck.
For some reason unlang does not catch SQL fail return code.
Only if there is no failure I see it is evaluating return code it prints in
debug mode
++? if (fail)
? Evaluating (fail) - FALSE
But when SQL return really fails it does not evaluate this condition and
nothing is printed in
leopold wrote:
No luck.
For some reason unlang does not catch SQL fail return code.
OK...
Only if there is no failure I see it is evaluating return code it prints in
debug mode
++? if (fail)
? Evaluating (fail) - FALSE
And you deleted the lines JUST ABOVE THAT which gave you the value
radius.conf
-
redundant redundant_sql {
# sql1
sql2
fail - I tried to comment this line but it does not
help
}
sites-enabled/default
-
authorize {
...
redundant_sql
if (fail) {
This is great Alan! This is exact answer I wished to hear
Thank again for your help.
Alan DeKok-2 wrote:
leopold wrote:
I want to keep NAS table replicated in redundant SQL servers for failover
reasons, is this fair?
Yes.
How do you propose solving SQL NAS table replication
Ivan/Alan,
Other then killing radiusd are there any other solutions to force radius to
drop request if all databases cannot be reached ?
With the latest release 2.1.4 my failover works fine, but still if there is
a network issue connecting to ALL Databases I do not see any practical
reason
leopold wrote:
For my situation since radiusd keeps everything in DB and if ALL databases
cannot be contacted the radiusd should not respond at all.
Is there any way to force radiusd to drop request and not to respond with
Access-Reject?
Try something like this:
authorize {
...
Guys,
I have a question about different failure modes in FreeRadius, basically I
want to differentiate between different scenarios of failures and return a
proper response (if any) to NAS device.
Failure example:
Backend database is down
Right now FreeRadius returns reject to NAS
rlm_sql (sql):
Hi,
Right now FreeRadius returns reject to NAS
rlm_sql (sql): Failed to connect DB handle #8
rlm_sql (sql): reconnect failed, database down?
rlm_sql_getvpdata: database query error
[sql] SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 8
++[sql] returns fail
Sending
Thanks Alan for reply.
Connection to another backup DB from the same radius server will help only
if the primary DB has real problem. But if there is a network issue to
connect to DB and DB is fine just radius daemon fails to communicate to the
database so in this case radius needs not to respond
Say I do not want to return reject in this case and I want the switch to
understand that radius is down and retry another radius server (a
backup/failover).
So call a script that executes killall radiusd - that should do it. But
that's insane.
Because if I return reject the NAS device treats
Thanks Ivan for your reply.
Regarding redundant databases:yes it can help because the problem will arise
only if all of them
sql1,sql2,sql3 are not reachable or dead.
We are keeping NAS table in database and do not use flat files
I am having another issue with readclients = yes option
I can't
I am having another issue with readclients = yes option
I can't keep this option set to yes in all 3 files:
sql1.conf,sql2.conf,sql3.conf
I want to keep NASes in the database and use DB replication to all 3
databases so all 3 databases have exact same mirrored data.
The problem happens that it
I want to keep NAS table replicated in redundant SQL servers for failover
reasons, is this fair?
Now, if NAS is kept only in one SQL server this will become a single point
of failure and if this particular DB fails then radius application cannot
just seemlessly failover to another redundant DB
leopold wrote:
I want to keep NAS table replicated in redundant SQL servers for failover
reasons, is this fair?
Yes.
How do you propose solving SQL NAS table replication challenge?
Use 2.1.4 when it comes out. I've fixed this problem, and this
behavior will be allowed.
Alan DeKok.
-
14 matches
Mail list logo