Primary key in radacct table
Hi, I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA service works fine, however my radacct table has sonetimes duplicate registers. I realize that it happens when a NAS does not have a realiable Internet conection, so NAS send the accounting packets several times. My radacct table has 'radacctid' as primary key. I realize that two (or more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields amog others. I know 'acctsessionid' field can be the same in diferent NASes. Would be a good idea change the primery key by 'acctuniqueid' ? Santiago _________________________________________________________________ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/
You can do it and it will solve your problem but it can create small overhead because radius tries to write into database and it will be rejected. you will see this in your log files. Another idea is to change NAS or you can create cron script to delete duplicated entries. MT On Mon, Oct 6, 2008 at 5:35 PM, Santiago Balaguer García < santiagoawa@hotmail.com> wrote:
Hi,
I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA service works fine, however my radacct table has sonetimes duplicate registers. I realize that it happens when a NAS does not have a realiable Internet conection, so NAS send the accounting packets several times.
My radacct table has 'radacctid' as primary key. I realize that two (or more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields amog others. I know 'acctsessionid' field can be the same in diferent NASes. Would be a good idea change the primery key by 'acctuniqueid' ?
Santiago
------------------------------ La cartera, las gafas. ¿te falta algo? Ahora llévate Messenger en tu móvil<http://www.vivelive.com/abecedario>
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I have a script to delete duplicate entries and stale session. But the duplicate accounting records were created in real time, I have to create a trigger in the database to detect these entries or activate a exec in accounting module. Is the 'acctuniqueid' attribute unique in all database in a default freeradius configuration? Date: Mon, 6 Oct 2008 17:53:32 +0200From: mangia81@gmail.comTo: freeradius-users@lists.freeradius.orgSubject: Re: Primary key in radacct table You can do it and it will solve your problem but it can create small overhead because radius tries to write into database and it will be rejected. you will see this in your log files.Another idea is to change NAS or you can create cron script to delete duplicated entries. MT On Mon, Oct 6, 2008 at 5:35 PM, Santiago Balaguer García <santiagoawa@hotmail.com> wrote: Hi, I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA service works fine, however my radacct table has sonetimes duplicate registers. I realize that it happens when a NAS does not have a realiable Internet conection, so NAS send the accounting packets several times. My radacct table has 'radacctid' as primary key. I realize that two (or more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields amog others.I know 'acctsessionid' field can be the same in diferent NASes.Would be a good idea change the primery key by 'acctuniqueid' ? Santiago La cartera, las gafas. ¿te falta algo? Ahora llévate Messenger en tu móvil-List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html _________________________________________________________________ ¿Sigue el calor? Consulta MSN El tiempo http://eltiempo.es.msn.com/
acctuniqueid is not unique in default configuration. according to my experience, problem with duplicated session is very strange. My NAS (Mtik 2.9.x and Mtik 3.x) sends duplicated session ids but almost in the same time. For example one session is started now and the second one is transfered 1 second later. On Tue, Oct 7, 2008 at 8:54 AM, Santiago Balaguer García < santiagoawa@hotmail.com> wrote:
I have a script to delete duplicate entries and stale session. But the duplicate accounting records were created in real time, I have to create a trigger in the database to detect these entries or activate a exec in accounting module.
Is the 'acctuniqueid' attribute unique in all database in a default freeradius configuration?
------------------------------
Date: Mon, 6 Oct 2008 17:53:32 +0200 From: mangia81@gmail.com To: freeradius-users@lists.freeradius.org Subject: Re: Primary key in radacct table
You can do it and it will solve your problem but it can create small overhead because radius tries to write into database and it will be rejected. you will see this in your log files.
Another idea is to change NAS or you can create cron script to delete duplicated entries.
MT
On Mon, Oct 6, 2008 at 5:35 PM, Santiago Balaguer García < santiagoawa@hotmail.com> wrote:
Hi,
I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA service works fine, however my radacct table has sonetimes duplicate registers. I realize that it happens when a NAS does not have a realiable Internet conection, so NAS send the accounting packets several times.
My radacct table has 'radacctid' as primary key. I realize that two (or more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields amog others. I know 'acctsessionid' field can be the same in diferent NASes. Would be a good idea change the primery key by 'acctuniqueid' ?
Santiago
------------------------------ La cartera, las gafas. ¿te falta algo? Ahora llévate Messenger en tu móvil<http://www.vivelive.com/abecedario>
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
------------------------------ Ahora llévate lo mejor de MSN y Windows Live, en tu móvil<http://serviciosmoviles.es.msn.com/>
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I use an index on acctuniqueid along with acct_unique { key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port-Id" } It works fine for me. Thanks, Alex 2008/10/7 Marinko Tarlac <mangia81@gmail.com>:
acctuniqueid is not unique in default configuration. according to my experience, problem with duplicated session is very strange. My NAS (Mtik 2.9.x and Mtik 3.x) sends duplicated session ids but almost in the same time. For example one session is started now and the second one is transfered 1 second later.
On Tue, Oct 7, 2008 at 8:54 AM, Santiago Balaguer García <santiagoawa@hotmail.com> wrote:
I have a script to delete duplicate entries and stale session. But the duplicate accounting records were created in real time, I have to create a trigger in the database to detect these entries or activate a exec in accounting module.
Is the 'acctuniqueid' attribute unique in all database in a default freeradius configuration?
________________________________ Date: Mon, 6 Oct 2008 17:53:32 +0200 From: mangia81@gmail.com To: freeradius-users@lists.freeradius.org Subject: Re: Primary key in radacct table
You can do it and it will solve your problem but it can create small overhead because radius tries to write into database and it will be rejected. you will see this in your log files.
Another idea is to change NAS or you can create cron script to delete duplicated entries.
MT
On Mon, Oct 6, 2008 at 5:35 PM, Santiago Balaguer García <santiagoawa@hotmail.com> wrote:
Hi,
I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA service works fine, however my radacct table has sonetimes duplicate registers. I realize that it happens when a NAS does not have a realiable Internet conection, so NAS send the accounting packets several times.
My radacct table has 'radacctid' as primary key. I realize that two (or more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields amog others. I know 'acctsessionid' field can be the same in diferent NASes. Would be a good idea change the primery key by 'acctuniqueid' ?
Santiago
________________________________ La cartera, las gafas. ¿te falta algo? Ahora llévate Messenger en tu móvil - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
________________________________ Ahora llévate lo mejor de MSN y Windows Live, en tu móvil - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I work with Mtik too, and I have the same problem with duplicate sessions. I am going to try Alex's solution. Thanks!!!
Date: Wed, 8 Oct 2008 10:46:43 +0100> From: alex@evilal.com> To: freeradius-users@lists.freeradius.org> Subject: Re: Primary key in radacct table> > I use an index on acctuniqueid> > along with> > acct_unique {> key = "User-Name, Acct-Session-Id, NAS-IP-Address,> Client-IP-Address, NAS-Port-Id"> }> > It works fine for me.> > Thanks,> > Alex> > > 2008/10/7 Marinko Tarlac <mangia81@gmail.com>:> > acctuniqueid is not unique in default configuration. according to my> > experience, problem with duplicated session is very strange. My NAS (Mtik> > 2.9.x and Mtik 3.x) sends duplicated session ids but almost in the same> > time. For example one session is started now and the second one is> > transfered 1 second later.> >> > On Tue, Oct 7, 2008 at 8:54 AM, Santiago Balaguer García> > <santiagoawa@hotmail.com> wrote:> >>> >> I have a script to delete duplicate entries and stale session. But the> >> duplicate accounting records were created in real time, I have to create a> >> trigger in the database to detect these entries or activate a exec in> >> accounting module.> >>> >> Is the 'acctuniqueid' attribute unique in all database in a default> >> freeradius configuration?> >>> >>> >>> >>> >> ________________________________> >> Date: Mon, 6 Oct 2008 17:53:32 +0200> >> From: mangia81@gmail.com> >> To: freeradius-users@lists.freeradius.org> >> Subject: Re: Primary key in radacct table> >>> >>> >> You can do it and it will solve your problem but it can create small> >> overhead because radius tries to write into database and it will be> >> rejected. you will see this in your log files.> >>> >> Another idea is to change NAS or you can create cron script to delete> >> duplicated entries.> >>> >> MT> >>> >> On Mon, Oct 6, 2008 at 5:35 PM, Santiago Balaguer García> >> <santiagoawa@hotmail.com> wrote:> >>> >> Hi,> >>> >> I am using a freeradius 1.1.7 + postgres since 3 years ago. The AAA> >> service works fine, however my radacct table has sonetimes duplicate> >> registers.> >> I realize that it happens when a NAS does not have a realiable Internet> >> conection, so NAS send the accounting packets several times.> >>> >> My radacct table has 'radacctid' as primary key. I realize that two (or> >> more) duplicate registers share 'acctsessionid' and 'acctuniqueid' fields> >> amog others.> >> I know 'acctsessionid' field can be the same in diferent NASes.> >> Would be a good idea change the primery key by 'acctuniqueid' ?> >>> >> Santiago> >>> >> ________________________________> >> La cartera, las gafas. ¿te falta algo? Ahora llévate Messenger en tu móvil> >> -> >> List info/subscribe/unsubscribe? See> >> http://www.freeradius.org/list/users.html> >>> >>> >> ________________________________> >> Ahora llévate lo mejor de MSN y Windows Live, en tu móvil> >> -> >> List info/subscribe/unsubscribe? See> >> http://www.freeradius.org/list/users.html> >> >> > -> > List info/subscribe/unsubscribe? See> > http://www.freeradius.org/list/users.html> >> > -> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/
hello again friends i did now all following step by step http://deployingradius.com/documents/configuration/active_directory.html and when y type radiusd -X at the end of the output i see: /etc/openradius/raddb/users[1]: Parse error (check) for entry users: Unknown value ntlm_auth for attribute Auth-Type Errors reading /etc/openradius/raddb/users /etc/openradius/raddb/modules/files[7]: Instantiation failed for module "files" /etc/openradius/raddb/sites-enabled/inner-tunnel[111]: Failed to find module "files". /etc/openradius/raddb/sites-enabled/inner-tunnel[34]: Errors parsing authorize section. } } Errors initializing modules thanks in advise , sorry for my insistence but who don't seek , will never going to get the truth. Luis
Hi,
at the end of the output i see: /etc/openradius/raddb/users[1]: Parse error (check) for entry users: Unknown value ntlm_auth for attribute Auth-Type Errors reading /etc/openradius/raddb/users /etc/openradius/raddb/modules/files[7]: Instantiation failed for module "files" /etc/openradius/raddb/sites-enabled/inner-tunnel[111]: Failed to find module "files". /etc/openradius/raddb/sites-enabled/inner-tunnel[34]: Errors parsing authorize section. } } Errors initializing modules
you've edited the default files in wrong and bad ways that has then caused the failure of the server. because you have an error in the users file, the 'files' module has failed...and because the 'files' module has failed, the inner-tunnel virtual server which has got the 'files' module configured has also failed. failed virtual servers or read server = no working daemon just fix the users entry alan
i did now all following step by step http://deployingradius.com/documents/configuration/active_directory.html
and when y type radiusd -X
at the end of the output i see: /etc/openradius/raddb/users[1]: Parse error (check) for entry users: Unknown value ntlm_auth for attribute Auth-Type Errors reading /etc/openradius/raddb/users /etc/openradius/raddb/modules/files[7]: Instantiation failed for module "files" /etc/openradius/raddb/sites-enabled/inner-tunnel[111]: Failed to find module "files". /etc/openradius/raddb/sites-enabled/inner-tunnel[34]: Errors parsing authorize section. Â } }
Add ntlm_auth to athenticate section of inner-tunnel virual server as well. You have probably added it just to default virtual server. Ivan Kalik Kalik Informatika ISP
participants (6)
-
A.L.M.Buxey@lboro.ac.uk -
Alex French -
luis a -
Marinko Tarlac -
Santiago Balaguer García -
tnt@kalik.net