MySQL Fail Over Error When 1 DB is Down
Rich Graves
rgraves at carleton.edu
Mon Aug 29 16:56:14 CEST 2011
> When I shutdown one of the DB, it generates an error. How do I tell
> freeradius to ignore that and proceed if it can connect to at least one
> of the DB? /etc/freeradius/sql2.conf[22]: Instantiation failed for
> module "sql2"
Both databases must be up at the time of radiusd startup. This seems
reasonable; if you have no redundancy, wouldn't you want to know?
Either one may go down while radiusd is running.
It looks like you could force a radiusd startup to "succeed" if one database
fails to instantiate, but then it would never retry the connection, and you
would be solely dependent on the database(s) that were available at startup.
Bottom line, don't start your radius server unless both databases are up.
On many Linux platforms, you could add an appropriate wrapper script at
/etc/sysconfig/radiusd to block startup, or perhaps to move a configuration
specific to the situation into place.
I think you're better off doing redundancy a layer up, though, like
_->radius1 ->db1
NAS<_ X |
->radius2 ->db2
i.e., if db1 is down, go ahead and allow radius1 to return failure to the NAS,
which will then fail over to radius2.
More information about the Freeradius-Users
mailing list