SQL Accounting oddness
John Williams
john.williams at eurisp.co.uk
Wed Oct 11 17:37:27 CEST 2006
I’ve just looked on my original radius server and did some debug on that and
the sql radius accounting looks the same as on the new radius server.
So I guess it’s supposed to look like that since the original radius server
is logging accounting to sql.
So I’m still none the wiser why radius accounting isn’t getting logged to
sql from the new radius server.
Help someone???
Thanks
John
_____
From:
freeradius-users-bounces+john.williams=eurisp.co.uk at lists.freeradius.org
[mailto:freeradius-users-bounces+john.williams=eurisp.co.uk at lists.freeradius
.org] On Behalf Of John Williams
Sent: 10 October 2006 17:06
To: 'FreeRadius users mailing list'
Subject: SQL Accounting oddness
I’ve just setup a new freeradius server using the exact same config files
from our other radius server.
We are using a different MySQL database for the second freeradius server so
we have changed the database name in sql.conf to reflect this.
Authentication is working fine and it’s authenticating from the database.
However accounting information is not being entered into the radacct table,
its currently empty but we are getting accounting packets back.
I run freeradius in debug mode and found the following sql accounting
queries that don’t look right:
sql: accounting_update_query_alt = "INSERT into radacct (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay)
values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}',
'', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}',
'%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}',
'%{Framed-IP-Address}', '0')"
sql: accounting_start_query = "INSERT into radacct (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay)
values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
'%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}',
'', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',
'%{Acct-Delay-Time}', '0')"
Surely the values should be replaced by the actual information it should be
entering into the table?
If that’s the case that’s why the radacct table is empty, MySQL won’t insert
the data showing there and must be erroring.
Anyone got any ideas?
Thanks
John
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.0.407 / Virus Database: 268.13.1/469 - Release Date: 09/10/2006
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.0.407 / Virus Database: 268.13.1/469 - Release Date: 09/10/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.0.408 / Virus Database: 268.13.2/471 - Release Date: 10/10/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20061011/cd084d36/attachment.html>
More information about the Freeradius-Users
mailing list