What is the best place to place directives to make separate calls to a separate database for accounting table updates. I want to use a database -- radius -- for strictly -- radcheck, reply, and radgroupcheck, group reply, and usergroup tables -- the radacct table I want to strictly be updated in a separate database: accounting. The reason for this is to keep database replication turned on for those check/reply tables, and not worry so much about replicating accounting tables between the database servers. I am running the following version of FreeRADIUS: radiusd: FreeRADIUS Version 2.2.4, for host i686-pc-linux-gnu, built on Apr 8 2014 at 18:21:52 At this point, I have SQL working for authorization and authentication purposes, and the databases are replicating between all 3 database servers. In radiusd.conf: $INCLUDE sql1.conf $INCLUDE sql2.conf $INCLUDE sqlacct1.conf $INCLUDE sqlacct2.conf In sites-enabled\default: authorize { ... redundant { sql1 sql2 } ... accounting { acct_unique detail unix radutmp sql sqlacct1 { fail = 1 notfound = return noop = 2 ok = return updated = 3 reject = return userlock = 4 invalid = 5 handled = 6 } Despite this, and despite the separate connection setting in sqlacct1.conf vs. sql1.conf -- radius still sending accounting data to radius:/radacct table for insertion. Sql1.conf: sql { ... # Database type # Current supported are: rlm_sql_mysql, rlm_sql_postgresql, # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds driver = "rlm_sql_mysql" # Connect info server = "127.0.0.1" login = "raduser" password = "XXXXXXXX" # Database table configuration radius_db = "radius" ... Sqlacct1.conf: Sql { ... # Database type # Current supported are: rlm_sql_mysql, rlm_sql_postgresql, # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds driver = "rlm_sql_mysql" # Connect info server = "127.0.0.1" login = "raduser" password = "XXXXXXXX" # Database table configuration radius_db = "accounting" ... Stacy
Hi Looks like you've called it with same name. If you want a seperate instance you'll need to call it a different name eg in the sqlacct file sql sqlacct { sql options here } THEN call sqlacct rather than sql in your accounting section. The filename means nothing. .. I'm surprised your current config works and doesn't just blow up (there again all you are doing is redefining options much like someone who leaves old config files in modules directory. ...) alan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
I have it working. It was as you said. Thanks! Stacy From: Alan Buxey [mailto:A.L.M.Buxey@lboro.ac.uk] Sent: Wednesday, April 16, 2014 4:58 PM To: FreeRadius users mailing list; Stacy Trippe; freeradius-users@lists.freeradius.org Subject: Re: help! seperate database for accounting Hi Looks like you've called it with same name. If you want a seperate instance you'll need to call it a different name eg in the sqlacct file sql sqlacct { sql options here } THEN call sqlacct rather than sql in your accounting section. The filename means nothing. .. I'm surprised your current config works and doesn't just blow up (there again all you are doing is redefining options much like someone who leaves old config files in modules directory. ...) alan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On Wed, Apr 16, 2014 at 09:42:17PM +0000, Stacy Trippe wrote:
In sites-enabled\default: authorize { ... redundant { sql1 sql2 }
OK
accounting { acct_unique detail unix radutmp sql sqlacct1 {
should be: sqlacct1 {
fail = 1 notfound = return noop = 2
...
Despite this, and despite the separate connection setting in sqlacct1.conf vs. sql1.conf -- radius still sending accounting data to radius:/radacct table for insertion.
The filenames make no difference. The definitions do:
Sql1.conf: sql {
should be: sql sql1 { (i.e. an instantation of the "sql" module, called "sql1")
... # Database type # Current supported are: rlm_sql_mysql, rlm_sql_postgresql, # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds driver = "rlm_sql_mysql" ...
Sqlacct1.conf: Sql {
should be: sql sqlacct1 {
... # Database type # Current supported are: rlm_sql_mysql, rlm_sql_postgresql, # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds driver = "rlm_sql_mysql"
# Connect info server = "127.0.0.1" ...
Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
participants (3)
-
Alan Buxey -
Matthew Newton -
Stacy Trippe