simultaneous use --solved-- :-)

Michael Ziemann mailinglist at ziemann-perl.de
Wed Sep 26 14:30:06 CEST 2007


Hi all!

I solved my simultaneous-use problems with AcctStopTime 0000-00-00 
00:00:00 ...

The reason was a wrong MySQL-Code in the sql.conf file:

accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime = '%S', 
AcctSessionTime = '%{Acct-Session-Time}',

AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = 
'%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-

Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', 
ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId =

'%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress 
= '%{NAS-IP-Address}'"



I changed it to:

# |----->
# | edited by Martin Kirchner & Michael Ziemann | Sep. 2007
# |----->

accounting_stop_query = "UPDATE ${acct_table1} \
          SET FramedIPAddress = '%{Framed-IP-Address}', \
          AcctSessionTime = '%{Acct-Session-Time}', \
          AcctInputOctets = '%{Acct-Input-Octets}', \
          AcctOutputOctets = '%{Acct-Output-Octets}', \
      AcctStopTime = FROM_UNIXTIME(UNIX_TIMESTAMP(`AcctStartTime`) + 
`AcctSessionTime` ) \
          WHERE UserName = '%{SQL-User-Name}' \
          AND AcctStopTime= '0000-00-00 00:00:00'"


Now it works very well... The users can login, but they can't login 
twice at the same time... The accounting works perfect, too...


Thanks for the good support and friendly responses.

My project is finished now...


Thanks for your patience!


Michael Ziemann



More information about the Freeradius-Users mailing list