(Fwd) Error on Accounting SQL

Breuer Nicolas Nicolas.Breuer at Belcenter.biz
Wed Jun 4 18:32:12 CEST 2008


 Hello ,

 Seems to have a bug on 2.0.4

WARNING: Deprecated conditional expansion ":-".  See "man unlang" for
details
WARNING: Deprecated conditional expansion ":-".  See "man unlang" for
details

 
 The accounting is stored into the SQL.

 Paste the debug here :

 ++[files] returns noop
+- entering group accounting
        expand: %{User-Name} -> BCXXX
rlm_sql (sql): sql_set_user escaped user --> 'BCXXX'

 TRIED THE UPDATE RADACCT .

        expand: UPDATE radacct           SET FramedIPAddress =
'%{Framed-IP-Address}',           
AcctSessionTime = '%{Acct-Session-Time}',           AcctInputOctets =
'%{Acct-Input-Octets-
64}',           AcctOutputOctets = '%{Acct-Output-Octets-64}'         
WHERE AcctSessionId = 
'%{Acct-Session-Id}'           AND UserName = '%{SQL-User-Name}'      
AND 
NASIPAddress= '%{NAS-IP-Address}' -> UPDATE radacct           SET
FramedIPAddress = '',           
AcctSessionTime = '',           AcctInputOctets = '',          
AcctOutputOctets = ''           WHERE 
AcctSessionId = '0D00003F280001EB-483E2C69'           AND UserName =
'BCXXX'                
AND NASIPAddress= '217.112.179.x'
rlm_sql (sql): Reserving sql socket id: 3

 NOT POSSIBLE because the line doesn't exists
 so Alternate SQL query should be used.

>>>>>>

WARNING: Deprecated conditional expansion ":-".  See "man unlang" for
details
WARNING: Deprecated conditional expansion ":-".  See "man unlang" for
details
>>>>>

 What's this error below ?


 ALTERNATE QUERY

        expand: 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-64}', '%{Acct-
Output-Octets-64}', '%{Called-Station-Id}','%{Calling-Station-Id}',
'%{Service-
Type}','%{Framed-Protocol}-1','%{Framed-IP-Address}', '0') -> INSERT
into radacct 
(AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress,
NASPortId,NASPortType, 
AcctStartTime, AcctSessionTime, AcctAuthentic,ConnectInfo_start,
AcctInputOctets, 
AcctOutputOctets, CalledStationId,CallingStationId, ServiceType,
FramedProtocol, 
FramedIPAddress,AcctStartDelay) values('0D00003F280001EB-483E2C69', 
'5c28bc24233262ac','BCXXX', '', '217.112.179.X',
'3777167632','Virtual', DATE_SUB('2008-
06-04 17:36:58',INTERVAL (0 +0) SECOND), '', '','', '', '', '','',
'Framed-User','PPP-1','', '0')
rlm_sql (sql): Released sql socket id: 3

 OK

++[sql] returns ok
++? if (!ok)
?
------- End of forwarded message -------



More information about the Freeradius-Users mailing list