Cannot insert duplicate key row in object 'dbo.radacct' with unique index 'AcctUniqueId'
Hello, i'am using freeradius 2.1.12+dfsg-1.2 on debian wheezy, AAA is in MS-SQL backend using iodbc, the system is a hotspot with mikrotik routerboard using radius client, everything is fine the users can authenticate from radcheck table but in accounting log i receive this message Error: sql_query: failed: [FreeTDS][SQL Server]Cannot insert duplicate key row in object 'dbo.radacct' with unique index 'AcctUniqueId'. The duplicate key value is (4785db03c.... the problem is the radacct table is not registering info like, acctstoptime, acctsessiontime and others, only acctstarttime if i modify the index unique of acctuniqueid like not unique is worst because in radacct table the start time and stoptime is inserted in two different rows i'm using the following schema https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/mods-confi... and the query from https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/mods-confi... by the way i had to modified the query.conf file because there is an error in variable NASPortId column, it is called from query.conf by NASPort , anyway my problem is the radacct table is not registering info like, acctstoptime, acctsessiontime and others I am wondering if can i use the mysql query file to achieve this? (obviously, making a little changes into querys ) for example i've put the postauth definition from mysql on mssql and it works. before always i've used freeradius + mysql and accounting is fine, unfortunately at this time i have to use MSSQL like backend, is not my fault ;) regards pablou
info Redlibre wrote:
Hello, i'am using freeradius 2.1.12+dfsg-1.2 on debian wheezy, AAA is in MS-SQL backend using iodbc, the system is a hotspot with mikrotik routerboard using radius client, everything is fine the users can authenticate from radcheck table but in accounting log i receive this message
Error: sql_query: failed: [FreeTDS][SQL Server]Cannot insert duplicate key row in object 'dbo.radacct' with unique index 'AcctUniqueId'. The duplicate key value is (4785db03c....
That seems clear.
the problem is the radacct table is not registering info like, acctstoptime, acctsessiontime and others, only acctstarttime
The raddacct table doesn't invent information. It gets information from accounting packets. So... the accounting packets don't have the information you're looking for.
i'm using the following schema
https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/mods-confi...
and the query from
https://github.com/FreeRADIUS/freeradius-server/blob/master/raddb/mods-confi...
That's really not recommended. The code in v2 is VERY different from v3. You MUST use the v2 schema and queries with v2.
I am wondering if can i use the mysql query file to achieve this? (obviously, making a little changes into querys )
Using queries intended for other SQL servers is completely wrong. Alan DeKok.
participants (2)
-
Alan DeKok -
info Redlibre