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
I’m still not sure what causes my issue and attached the debug output for server start, 1 acct and 1 auth request. Both these requests did not lead to duplicates as the one in the attachment. Debug Log is attached. There is one thing that caught my attention: It says Sending Accounting-Request of id 47 to 196.25.102.32 port 1646 And then after that package: Proxying request 2 to home server 196.25.102.32 port 1646 Sending Accounting-Request of id 47 to 196.25.102.32 port 1646 This is both the same package. Maybe the odd thing is not the duplicate every once in a while but rather the fact that the bulk of them is not duplicated?
Marius Pesé wrote:
This is both the same package. Maybe the odd thing is not the duplicate every once in a while but rather the fact that the bulk of them is not duplicated?
Accounting packets WILL get sent twice. There's little you can do to avoid that. You need to design the system so that it handles duplicate accounting packets. Alan DeKok.
Hi Alan, thanks for the quick reply. If accounting packets are sent twice per default, do you have a guess as to why 1 or 2 per day lead to duplicate entries and the other hundred or so just have 1 entry? Thanks Marius ________________________________________ From: freeradius-users-bounces+marius=mindspring.co.za@lists.freeradius.org [freeradius-users-bounces+marius=mindspring.co.za@lists.freeradius.org] On Behalf Of Alan DeKok [aland@deployingradius.com] Sent: Wednesday, April 13, 2011 12:12 PM To: FreeRadius users mailing list Subject: Re: FW: Duplicate Accounting maybe once, twice a day Marius Pesé wrote:
This is both the same package. Maybe the odd thing is not the duplicate every once in a while but rather the fact that the bulk of them is not duplicated?
Accounting packets WILL get sent twice. There's little you can do to avoid that. You need to design the system so that it handles duplicate accounting packets. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Marius Pesé wrote:
thanks for the quick reply. If accounting packets are sent twice per default,
That's not what I said.
do you have a guess as to why 1 or 2 per day lead to duplicate entries and the other hundred or so just have 1 entry?
They CAN get sent twice. Sometimes. Alan DeKok.
On Wed, Apr 13, 2011 at 5:12 PM, Alan DeKok <aland@deployingradius.com> wrote:
Marius Pesé wrote:
This is both the same package. Maybe the odd thing is not the duplicate every once in a while but rather the fact that the bulk of them is not duplicated?
Accounting packets WILL get sent twice. There's little you can do to avoid that.
You need to design the system so that it handles duplicate accounting packets.
... which sometimes is as simple as changing the database schema to use (username,acctuniqid) as unique key. When you do that and a duplicate accounting start packet arrives, the default accounting_start_query (insert) on dialup.conf should fail and accounting_start_query_alt (update) will be executed instead. So you won't have duplicate records. -- Fajar
participants (3)
-
Alan DeKok -
Fajar A. Nugraha -
Marius Pesé