Duplicate RADIUS accounting, same everything except radacctid
Hello, We have a FreeRADIUS 3.0.15 server on CentOS providing authentication for PPPoE. Very occasionally we are getting a couple random duplicate records in the radacct table. It happens a few times a month. We have about 600 customers total, and an interim-update of 30 minutes configured on our NAS, so there are many updates that are working and only a few strange and occasional exceptions that are not. Below is an example of one such duplication (with information redacted). I checked the accounting text log in /var/log/radius/radacct/nasip and I see no duplication in that file for the same record shown below, it only appears once (it is an Interim-Update). Any ideas as to what the problem might be and how to fix it? Thanks. MariaDB [radius]> select * from radacct where acctstoptime is NULL and username='Smokefree';+-------- ---+---------------+----------------------------------+-----------+-----------+-------+--------------+-----------------+-------------+---------------------+--------------+-----------------+---------------+-------------------+------------------+-----------------+------------------+-----------------+-------------------+--------------------+-------------+----------------+-----------------+----------------+---------------+----------------------+---------------------+--------------+ | radacctid | acctsessionid | acctuniqueid | username | groupname | realm | nasipaddress | nasportid | nasporttype | acctstarttime | acctstoptime | acctsessiontime | acctauthentic | connectinfo_start | connectinfo_stop | acctinputoctets | acctoutputoctets | calledstationid | callingstationid | acctterminatecause | servicetype | framedprotocol | framedipaddress | acctstartdelay | acctstopdelay | xascendsessionsvrkey | acctupdatetime | acctinterval | +-----------+---------------+----------------------------------+-----------+-----------+-------+--------------+-----------------+-------------+---------------------+--------------+-----------------+---------------+-------------------+------------------+-----------------+------------------+-----------------+-------------------+--------------------+-------------+----------------+-----------------+----------------+---------------+----------------------+---------------------+--------------+ | 624635 | 8112785d | d0f315f66688cdadd5b436377f0a51aa | Smokefree | | | 172.16.160.2 | bridge-pppoe-bc | Ethernet | 2018-08-13 14:49:03 | NULL | 3600 | RADIUS | | | 8985136 | 253567605 | ppp-sonar-bcn |60:E3:RE:DA:CT:ED | | Framed-User | PPP | 206.RED.ACT.ED | NULL | NULL | NULL | 2018-08-13 15:49:03 | 1800 | | 624637 | 8112785d | d0f315f66688cdadd5b436377f0a51aa | Smokefree | | | 172.16.160.2 | bridge-pppoe-bc | Ethernet | 2018-08-13 14:49:03 | NULL | 3600 | RADIUS | | | 8985136 | 253567605 | ppp-sonar-bcn | 60:E3:RE:DA:CT:ED | | Framed-User | PPP | 206.RED.ACT.ED | NULL | NULL | NULL | 2018-08-13 15:49:03 | 1800 | +-----------+---------------+----------------------------------+-----------+-----------+-------+--------------+-----------------+-------------+---------------------+--------------+-----------------+---------------+-------------------+------------------+-----------------+------------------+-----------------+-------------------+--------------------+-------------+----------------+-----------------+----------------+---------------+----------------------+---------------------+--------------+
On Aug 13, 2018, at 5:13 PM, Michael Ducharme <mducharme@gmail.com> wrote:
We have a FreeRADIUS 3.0.15 server on CentOS providing authentication for PPPoE. Very occasionally we are getting a couple random duplicate records in the radacct table. It happens a few times a month. We have about 600 customers total, and an interim-update of 30 minutes configured on our NAS, so there are many updates that are working and only a few strange and occasional exceptions that are not.
Below is an example of one such duplication (with information redacted). I checked the accounting text log in /var/log/radius/radacct/nasip and I see no duplication in that file for the same record shown below, it only appears once (it is an Interim-Update). Any ideas as to what the problem might be and how to fix it?
If you have the correct indexes on the tables, then it *cannot* insert two rows with the sam Acct-Unique-ID. Alan DeKok.
Hi Alan, thanks, we figured that out yesterday morning - the table was for some reason missing the UNIQUE constraint for the key acctuniqueid. We had to craft a DELETE to get rid of the duplicate data and then corrected the constraint. On Wed, Aug 15, 2018 at 6:19 AM Alan DeKok <aland@deployingradius.com> wrote:
On Aug 13, 2018, at 5:13 PM, Michael Ducharme <mducharme@gmail.com> wrote:
We have a FreeRADIUS 3.0.15 server on CentOS providing authentication for PPPoE. Very occasionally we are getting a couple random duplicate records in the radacct table. It happens a few times a month. We have about 600 customers total, and an interim-update of 30 minutes configured on our NAS, so there are many updates that are working and only a few strange and occasional exceptions that are not.
Below is an example of one such duplication (with information redacted). I checked the accounting text log in /var/log/radius/radacct/nasip and I see no duplication in that file for the same record shown below, it only appears once (it is an Interim-Update). Any ideas as to what the problem might be and how to fix it?
If you have the correct indexes on the tables, then it *cannot* insert two rows with the sam Acct-Unique-ID.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Michael Ducharme