problem with mysql accounting
Dennis Skinner
dskinner at bluefrog.com
Thu Dec 21 19:52:04 CET 2006
basile wrote:
> accounting_start_query = "INSERT into radaact SET\
> `User-Name` = '%{User-Name}',\
> `Calling-Station-Id` = '%{Calling-Station-Id}',\
> `Called-Station-Id` = '%{Called-Station-Id}',\
> `NAS-IP-Address` = '%{NAS-IP-Address}',\
> `NAS-Port` = %{NAS-Port},\
> `Timestamp Start` = NOW(),\
> `Acct-Unique-Session-Id` = '%{Acct-Unique-ession-Id}'
> "
Any particular reason you are using backticks (`) instead of single
quotes (') around the column names? I'm not sure if they have special
meanings in radius/mysql.
You should also ensure that the Acct-Unique-Session-Id is truly unique
when you UPDATE. Often NAS's will reuse supposedly unique id's. Esp if
they are rebooted. Looking for a Timestamp Start within X hours of
NOW() may help you out there. Otherwise you may update really old rows
and have sessions that look like they lasted 30 days or something. We
ran into this problem.
--
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com
More information about the Freeradius-Users
mailing list