Thank you Alan,

Sorry but this is new for me. Freeradius is now running but on one db.
Now the last step freeradius SQL db failover!
So i leave the default config in radiusd.conf include the file sql.conf
and put this in my radiusd.conf:

$INCLUDE  ${confdir}/sql.conf

modules {
sql sql1 {
driver = "rlm_sql_mysql
server="myfirstserver.example"
# Insert the rest of config of sql.conf in here
# include this? -> STRCMP(Username, '%{SQL-User-Name}') = 0 ORDER BY id"
# etc.
}
sql sql2 {
driver = "rlm_sql_mysql
server="mysecondserver.example"
# Insert the rest of config of sql2.conf in here
# include this? -> STRCMP(Username, '%{SQL-User-Name}') = 0 ORDER BY id"
# etc.
}
always handled {
rcode = handled
}
}


accounting { redundant { sql1 # try module sql1 sql2 # if that's down, try module sql2 handled # otherwise drop the request as # it's been "handled" by the "always" # module (see doc/rlm_always) } }

Thats it? Thank you to support me.

Michel


----- Original Message ----- From: "Alan DeKok" <[EMAIL PROTECTED]>
To: <freeradius-users@lists.freeradius.org>
Sent: Friday, January 14, 2005 3:56 PM
Subject: Re: SQL db failover


Michel van Dop <[EMAIL PROTECTED]> wrote:
I use freeradius-0.9.3-1.1 and freeradius-mysql-0.9.3-1.1 I now this is old
but this is the last stap!

I would suggest upgrading. See http://www.freeradius.org/security.html

I have this in the radiusd.conf

$INCLUDE  ${confdir}/sql.conf
$INCLUDE  ${confdir}/sql2.conf

The default configuration includes sql.conf from *inside* of the "modules" section. Why have you taken them out?

modules {
    sql sql {
      }
    sql sql2 {
      }

And you've just defined two SQL modules with ZERO configuration.

 Let me guess: you put those two entries there because after you
removed "$INCLUDE ...sql.conf" from the "modules" section, the server
complained about "no such module sql".  Now that you've added empty
SQL configuration, the server doesn't give that errror, but gives
another one.

 The solution is to follow the default configuration of the server.
Don't move things around if you don't know why they're in a particular
location.  And if the server complains after you've moved things
around anyways, odds are that you did the wrong thing.

 Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Attachment: sql.conf
Description: Binary data



Reply via email to