Hello,

I have the same problem the one explained here:
http://lists.cistron.nl/pipermail/freeradius-users/2002-September/011562.html

Basically, I set up two redundant sql instances (sql1 and sql2) for
accounting:

accounting {
        acct_unique
        redundant {
                sql1
                sql2
        }
}

and I get accouting done twice (one time on each server).

Here is my configuration (to explain de trace) using FreeRadius CVS
version from friday 2002/12/06:

AAA packets are sent from a unique client to a FR hosted on radproxy
machine. This machine knows 2 realms (raceme & raceme_inc) which are
forwarded to two other machines (radclient1 & radclient2) with crossed
failover:
raceme_inc -> radclient1/radclient2
raceme     -> radclient2/radclient1

The radclient machines authorize and authenticate on an OpenLDAP servers
in failover mode:
radclient1 -> radclient2/radclient1
radclient2 -> radclient1/radclient2

And the radclient machines should do accounting in a mysql database also
in failover mode:
radclient1 -> radproxy/radclient2
radclient2 -> radproxy/radclient1

After the test run, the number of accounting lines on radproxy is
strictly equal to the sum of lines from radclient1 and radclient2. So
there is no redundancy but duplicity.


Here is the trace:

rad_recv: Accounting-Request packet from host 192.168.45.20:1814, id=159, length=84
        Acct-Terminate-Cause = User-Request
        Acct-Input-Octets = 12000
        Acct-Output-Octets = 1200
        Acct-Session-Time = 4
        Acct-Delay-Time = 0
        User-Name = "u_76@raceme_inc"
        Acct-Status-Type = Stop
        NAS-IP-Address = 192.168.45.254
        Proxy-State = 0x313632
modcall: entering group preacct
  modcall[preacct]: module "preprocess" returns noop
modcall: group preacct returns noop
modcall: entering group accounting
rlm_acct_unique: WARNING: Attribute NAS-Port-Id was not found in request, unique ID 
MAY be inconsistent
rlm_acct_unique: WARNING: Attribute Acct-Session-Id was not found in request, unique 
ID MAY be inconsistent
rlm_acct_unique: Hashing ',Client-IP-Address = 192.168.45.20,NAS-IP-Address = 
192.168.45.254,,User-Name = "u_76@raceme_inc"'
rlm_acct_unique: Acct-Unique-Session-ID = "a9bdef9b769a9438".
  modcall[accounting]: module "acct_unique" returns ok
modcall: entering group redundant
radius_xlat:  'u_76@raceme_inc'
rlm_sql (sql0): sql_set_user escaped user --> 'u_76@raceme_inc'
radius_xlat:  'UPDATE radacct SET AcctStopTime = '2002-12-10 10:46:32', 
AcctSessionTime = '4', AcctInputOctets = '12000', AcctOutputOctets = '1200', 
AcctTerminateCause = 'User-Request', AcctStopDelay = '0', ConnectInfo_stop = '' WHERE 
AcctSessionId = '' AND UserName = 'u_76@raceme_inc' AND NASIPAddress = 
'192.168.45.254' AND AcctStopTime = 0'
rlm_sql (sql0): Reserving sql socket id: 3
rlm_sql (sql0): Released sql socket id: 3
  modcall[accounting]: module "sql0" returns ok
radius_xlat:  'u_76@raceme_inc'
rlm_sql (sql2): sql_set_user escaped user --> 'u_76@raceme_inc'
radius_xlat:  'UPDATE radacct SET AcctStopTime = '2002-12-10 10:46:32', 
AcctSessionTime = '4', AcctInputOctets = '12000', AcctOutputOctets = '1200', 
AcctTerminateCause = 'User-Request', AcctStopDelay = '0', ConnectInfo_stop = '' WHERE 
AcctSessionId = '' AND UserName = 'u_76@raceme_inc' AND NASIPAddress = 
'192.168.45.254' AND AcctStopTime = 0'
rlm_sql (sql2): Reserving sql socket id: 3
rlm_sql (sql2): Released sql socket id: 3
  modcall[accounting]: module "sql2" returns ok
modcall: group redundant returns ok
modcall: group accounting returns ok
Sending Accounting-Response of id 159 to 192.168.45.20:1814
        Proxy-State = 0x313632
Finished request 137
Going to the next request



On radproxy:
mysql> select count(*) from radacct;
+----------+
| count(*) |
+----------+
|       74 |
+----------+

On radclient1:
mysql> select count(*) from radacct;
+----------+
| count(*) |
+----------+
|       36 |
+----------+

On radclient2:
mysql> select count(*) from radacct;
+----------+
| count(*) |
+----------+
|       38 |
+----------+


Any help welcome :)

Christophe.


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

Reply via email to