Re: FW: Duplicate Accounting maybe once, twice a day

2011-04-13 Thread Alan DeKok
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


RE: FW: Duplicate Accounting maybe once, twice a day

2011-04-13 Thread Marius Pesé
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...@lists.freeradius.org 
[freeradius-users-bounces+marius=mindspring.co...@lists.freeradius.org] On 
Behalf Of Alan DeKok [al...@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

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


Re: FW: Duplicate Accounting maybe once, twice a day

2011-04-13 Thread Alan DeKok
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.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: FW: Duplicate Accounting maybe once, twice a day

2011-04-13 Thread Fajar A. Nugraha
On Wed, Apr 13, 2011 at 5:12 PM, Alan DeKok al...@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

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