Radacct Reused ?

Alan DeKok aland at deployingradius.com
Fri Apr 19 20:12:14 CEST 2019

On Apr 18, 2019, at 7:24 PM, Oscar <oscar at jofre.com> wrote:
> I don't understand what you mean. My freeradius is on default configuration (as far as I know) version 3.0.13

  You asked about why the information in SQL was wrong, and mentioned the added trigger.  It should not be a surprise that the response is "maybe the problem is the trigger".

> And yestarday I got from freeradius an insert with same acctsessionid, acctstoptime:
> 20190417 19:42:18,ip-10-10-2-197,radius,,46429987,224924771,QUERY,radius,'INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress) VALUES (\'80a00001\', \'6cf28675aa2c38a046d7f46f65e36e72\', \'SwB_120669_ins_425_E8:11:32:E3:77:AF\', \'\', \'\', \'bridge-hs\', \'Wireless-802.11\', FROM_UNIXTIME(1555530138), FROM_UNIXTIME(1555530138), NULL, \'0\', \'\', \'\', \'\', \'0\', \'0\', \'4AC704E1E050\', \'E8:11:32:E3:77:AF\', \'\', \'\', \'\', \'\')',1062
> This insert fails due to duplicate key.
> Error Code: 1062. Duplicate entry '6cf28675aa2c38a046d7f46f65e36e72' for key 'acctuniqueid'

  It would have helped to say this at the start.  If the trigger isn't relevant, you shouldn't have mentioned it.

> And then the updates comes:
> 20190417 19:42:18,ip-10-10-2-197,radius,,46429987,224924772,QUERY,radius,'UPDATE radacct SET acctstarttime = FROM_UNIXTIME(1555530138), acctupdatetime = FROM_UNIXTIME(1555530138), connectinfo_start = \'\' WHERE AcctUniqueId = \'6cf28675aa2c38a046d7f46f65e36e72\'',0
> Can you help me to know how is calculated the 'acctuniqueid' to see why appears duplicated ?

  The debug output shows you when / where it's calculated.

> Maybe it is important to share that the freeradius has been working on a server machine the last 2 years and we migrate to a new machine, we move from the old machine to the new all database and we update version from freeradius 3.0.10 on the old machine to 3.0.13 on the new machine.

  Why not upgrade to 3.0.19?

  It will fix all known problems.

  Alan DeKok.

More information about the Freeradius-Users mailing list