Hi everybody, I'm using 2 Freeradius 2.0.5 servers for writting Accounting Requests into separate Oracle DBs (one for each server ). let's say one of the servers stops. On restart I need the radius server to execute a stored procedure that will syncronize the DBs. is it possible to execute this procedure without any accounting requests coming in ? -- View this message in context: http://www.nabble.com/SQL-Query-question-tp19992564p19992564.html Sent from the FreeRadius - User mailing list archive at Nabble.com.
I'm using 2 Freeradius 2.0.5 servers for writting Accounting Requests into separate Oracle DBs (one for each server ). let's say one of the servers stops. On restart I need the radius server to execute a stored procedure that will syncronize the DBs.
Why? Are you using copy-acct-to-home-server virtual server to proxy accounting between servers and keep them in sync? If you are, when the server comes back online queued requests will start flowing and accounting will be in sync in a few seconds (depending on how many queued requests there are). Ivan Kalik Kalik Informatika ISP
tnt-4 wrote:
I'm using 2 Freeradius 2.0.5 servers for writting Accounting Requests into separate Oracle DBs (one for each server ). let's say one of the servers stops. On restart I need the radius server to execute a stored procedure that will syncronize the DBs.
Why? Are you using copy-acct-to-home-server virtual server to proxy accounting between servers and keep them in sync? If you are, when the server comes back online queued requests will start flowing and accounting will be in sync in a few seconds (depending on how many queued requests there are).
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I'm not using copy-acct-to-home-server yet. I have another question. Can copy-acct-to-home-server still help me to sync DBs if the 2 radius servers are online but one of them losses its connectivity with the DB ? Thanks -- View this message in context: http://www.nabble.com/SQL-Query-question-tp19992564p19993704.html Sent from the FreeRadius - User mailing list archive at Nabble.com.
I'm not using copy-acct-to-home-server yet. I have another question. Can copy-acct-to-home-server still help me to sync DBs if the 2 radius servers are online but one of them losses its connectivity with the DB ?
No. But then authentication will fail too. I am not sure if buffered-sql virtual server will queue requests when sql connection fails. You might want to look at setting up robust proxy accounting (also in raddb/sites-available) which uses new features and requires bit more setting up. Ivan Kalik Kalik Informatika ISP
tnt-4 wrote:
I'm not using copy-acct-to-home-server yet. I have another question. Can copy-acct-to-home-server still help me to sync DBs if the 2 radius servers are online but one of them losses its connectivity with the DB ?
No. But then authentication will fail too. I am not sure if buffered-sql virtual server will queue requests when sql connection fails.
You might want to look at setting up robust proxy accounting (also in raddb/sites-available) which uses new features and requires bit more setting up.
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I don't use authentication. I'll give you the full description of my system and maybe you think of a solution without modifying the source code: A client sends only Accounting Start Requests(the same request for the 2 servers) to my 2 radius servers (geographically separated). The requests are send to separate DBs. I need to sync the DBs in the following situations: 1. one radius server goes down. on restart the DBs must sync 2. one servers loses connectivity to its DB. when the connection is reestablished the DBs must sync. I thought it could be possible to execute a stored procedure on these 2 cases. ( upon restart and upon reestablishing the connection). -- View this message in context: http://www.nabble.com/SQL-Query-question-tp19992564p19995681.html Sent from the FreeRadius - User mailing list archive at Nabble.com.
I don't use authentication.
I hope this means "I don't use radius authentication."
I'll give you the full description of my system and maybe you think of a solution without modifying the source code: A client sends only Accounting Start Requests(the same request for the 2 servers) to my 2 radius servers (geographically separated). The requests are send to separate DBs.
OK. You are independantly processing the same information by two radius servers storing data in different databases in parallel. No interaction whatsoever. Unsuprisingly, when things go wrong, it's not going to be easy to sync them up again. If they were in sync at all. Considering that freeradius is multithreaded and that it has multiple threads to the database what chance is there that database info will be consistant after a while? On low load - good. With high loads or spikes - slim to none. Processing information independantly is a bad idea if you want to have identical copies of data. You can have both redundancy and consistancy using built-in capability of your devices: NAS should have easily configurable radius server fail-over; freeradius has configurable sql module fail-over (see man unlang); sql servers can manage replication between databases and maintain identical data sets. So, if radius1 fails, radius2 takes over; sql1 will replicate data to sql2; if sql1 fails data will be sent to sql2 and replicated to sql1 whan it comes back (multimaster replication). If basic capabilities are not good enough for you, there are high availability solutions that can improve on fail-over and replication. Ivan Kalik Kalik Informatika ISP
tnt-4 wrote:
I don't use authentication.
I hope this means "I don't use radius authentication."
I'll give you the full description of my system and maybe you think of a solution without modifying the source code: A client sends only Accounting Start Requests(the same request for the 2 servers) to my 2 radius servers (geographically separated). The requests
are
send to separate DBs.
OK. You are independantly processing the same information by two radius servers storing data in different databases in parallel. No interaction whatsoever. Unsuprisingly, when things go wrong, it's not going to be easy to sync them up again. If they were in sync at all.
Considering that freeradius is multithreaded and that it has multiple threads to the database what chance is there that database info will be consistant after a while? On low load - good. With high loads or spikes - slim to none.
Processing information independantly is a bad idea if you want to have identical copies of data. You can have both redundancy and consistancy using built-in capability of your devices: NAS should have easily configurable radius server fail-over; freeradius has configurable sql module fail-over (see man unlang); sql servers can manage replication between databases and maintain identical data sets. So, if radius1 fails, radius2 takes over; sql1 will replicate data to sql2; if sql1 fails data will be sent to sql2 and replicated to sql1 whan it comes back (multimaster replication). If basic capabilities are not good enough for you, there are high availability solutions that can improve on fail-over and replication.
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
The load will be very low: maximum 30 requests/second. I'm now thinking of altering the code so that when the connection to the DB is reestablished a stored procedure( named SYNC_DB) will be launched. Does anyone know which files I have to modify ? -- View this message in context: http://www.nabble.com/SQL-Query-question-tp19992564p20031606.html Sent from the FreeRadius - User mailing list archive at Nabble.com.
Hi,
No. But then authentication will fail too. I am not sure if buffered-sql virtual server will queue requests when sql connection fails.
...it does do here - the file just grows and grows until it can start putting things away again.
You might want to look at setting up robust proxy accounting (also in raddb/sites-available) which uses new features and requires bit more setting up.
aye. still looking at that one. alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
andreiv -
tnt@kalik.net