Multiple accounting requests crash the server

Alan DeKok aland at deployingradius.com
Fri Jan 25 14:37:32 CET 2008


Mother wrote:
> I am seeing a strange situation. I receive an accounting-stop request
> from a NAS, and FreeRADIUS (1.1.7 against Oracle) updates the
> corresponding radacct record. However, the NAS is not receiving the ack,
> and thus re-sends the stop request. On the second request, FreeRADIUS
> tries to do an update query again, and then, an insert query, with the
> stop message details (i.e. only a stop time, reason idle-timeout, etc.),
> which fails.

  Why?

> After the third request from the NAS (and corresponding
> update followed by insert), Oracle throws a unique constraint violation
> error, and the server freezes.

  Weird.

> Questions:
> 
> 1. Why is FreeRADIUS failing to see that this request was already
> acknowledged, i.e. it has been updated on the database, and just sends
> an ACK, rather than trying to insert a new record?

  Because RADIUS doesn't work like that.  Accounting requests are never
re-sent, so *all* accounting requests are "brand new", and have to be
treated that way.

> 2. Why does FreeRADIUS freeze on an SQL error from Oracle? Should it not
> just log the error and carry on about its business? I am finding my
> server freezing every few days due to these issues, for example, if a
> query takes too long to run, or a trigger fails to execute. Is
> FreeRADIUS against Oracle more fragile than say MySQL?

  I think that fewer people are using it that way.

  Perhaps you could try posting the error message, or run it under "gdb"
to see why it's freezing.

  Alan DeKok.



More information about the Freeradius-Users mailing list