Hi everyone,
we are having an issue on our FreeRadius setup where our redundant servers will
maybe once, twice a day create duplicate accounting entries.
I have switched the servers to debug for a full day and caught one of these
incidents in the log file, see attached.
The strange thing is it only happens maybe once a day, regardless of realm or
user, and the other couple of hundred accounting requests are fine.
Can anyone see why this particular one would bounce back and forth?
Our setup consists of two virtually identical FreeRadius2 servers, each with
their own mySQL database, so each of them is capable of doing Auth and Acct,
and proxies Acct to the other one.
Also I changed the acct_update_alt query to write to a failover table since I
thought this was the alt query being triggered, but this does not make a
difference. Still duplicates in radacct table.
Thanks!
Marius
__
Marius Pesé
Senior Software Developer
B.Sc. Computer Science
[cid:image003.jpg@01CBF85B.77F8AF50]http://www.mindspring.co.za/
Unit 5, Doncaster Office ParkMindspring Computing
Punters Way, Kenilworth P O Box 46926
Cape Town, South Africa Glosderry 7702
Phone: +27 21 657 1780 Fax : +27 21 671 7599
Cell : 072 100 70 73
E-mail: mar...@mindspring.co.zamailto:mar...@mindspring.co.za
inline: image003.jpgrad_recv: Accounting-Request packet from host 196.43.1.87 port 1820, id=1,
length=261
Acct-Session-Id = 3/0/0/5.159_00A0493F
Framed-Protocol = PPP
Framed-IP-Address = 41.144.110.38
User-Name = aba...@msp.co.za
X-Ascend-Connect-Progress = LAN-Session-Up
X-Ascend-PreSession-Time = 3
X-Ascend-Xmit-Rate = 4096000
X-Ascend-Data-Rate = 4096000
Acct-Session-Time = 3404
Acct-Input-Octets = 970
Acct-Output-Octets = 994
X-Ascend-Pre-Input-Octets = 86
X-Ascend-Pre-Output-Octets = 91
Acct-Input-Packets = 62
Acct-Output-Packets = 62
X-Ascend-Pre-Input-Packets = 5
X-Ascend-Pre-Output-Packets = 6
Acct-Authentic = RADIUS
Acct-Status-Type = Interim-Update
NAS-Port-Type = Virtual
NAS-Port = 805634207
NAS-Port-Id = 3/0/0/5.159
Connect-Info = AutoShapedVC
Calling-Station-Id = 0182932392
Class = NL1
Service-Type = Framed-User
NAS-IP-Address = 196.43.27.100
X-Ascend-Session-Svr-Key = 01FB51D4
Acct-Delay-Time = 5
Telkom-Access-Type = DSL
Proxy-State = 0x3436
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 805634207,Client-IP-Address =
196.43.1.87,NAS-IP-Address = 196.43.27.100,Acct-Session-Id =
3/0/0/5.159_00A0493F,User-Name = aba...@msp.co.za'
[acct_unique] Acct-Unique-Session-ID = bf140131ce2e1d1f.
++[acct_unique] returns ok
[suffix] Looking up realm msp.co.za for User-Name = aba...@msp.co.za
[suffix] Found realm msp.co.za
[suffix] Adding Stripped-User-Name = abacus
[suffix] Adding Realm = msp.co.za
[suffix] Proxying request from user abacus to realm msp.co.za
[suffix] Preparing to proxy accounting request to realm msp.co.za
++[suffix] returns updated
++[files] returns noop
+- entering group accounting {...}
[radutmp] expand: /var/log/radius/radutmp - /var/log/radius/radutmp
[radutmp] expand: %{User-Name} - aba...@msp.co.za
++[radutmp] returns ok
[sql] expand: %{User-Name} - aba...@msp.co.za
[sql] sql_set_user escaped user -- 'aba...@msp.co.za'
[sql] expand: %{Acct-Input-Gigawords} -
[sql] ... expanding second conditional
[sql] expand: %{Acct-Input-Octets} - 970
[sql] expand: %{Acct-Output-Gigawords} -
[sql] ... expanding second conditional
[sql] expand: %{Acct-Output-Octets} - 994
[sql] expand:UPDATE radacct SET
framedipaddress = '%{Framed-IP-Address}', acctsessiontime =
'%{Acct-Session-Time}', acctinputoctets =
'%{%{Acct-Input-Gigawords}:-0}' 32 |
'%{%{Acct-Input-Octets}:-0}', acctoutputoctets=
'%{%{Acct-Output-Gigawords}:-0}' 32 |
'%{%{Acct-Output-Octets}:-0}' WHERE acctsessionid =
'%{Acct-Session-Id}' AND username= '%{SQL-User-Name}'
AND nasipaddress= '%{NAS-IP-Address}' -UPDATE radacct
SET framedipaddress = '41.144.110.38',
acctsessiontime = '3404', acctinputoctets = '0' 32 |
'970', acctoutputoctets= '0'
32 |'994' WHERE acctsessionid
= '3/0/0/5.159_00A0493F' AND username= 'aba...@msp.co.za
rlm_sql (sql): xlat failed.
rlm_sql (sql): Reserving sql socket id: 5
rlm_sql_mysql: query: UPDATE radacct SET
framedipaddress