Dear all expert

I use

VPS Server with
4 cpus , cpu grap usage only 10%
6 GB of Ram, Now system uses ram only 1.5GB

Freeradius 2.1.0
Debian 64bit Lenny
Mysql 5.1.54-log

In this server I install Directadmin for Manage Hosting
I have another website run on this server and use Mysql Database too.

So I link (ln -s) mysql.sock? to path /tmp/mysql.sock by directadmin run mysql

my radacct table size? is about 38mb and has about 120,000 records

NAS as Coova-Chilli 1.2.2 on Ubuntu 9.04 Server i386

The Problem
- When Nas send update accounting to Freeradius , Freeradius not update but insert new record (this appear sometime and some user. not all)
this my debug log

Sat Jun 11 14:40:55 2011 : Info: [suffix] No such realm "NULL"
Sat Jun 11 14:40:55 2011 : Info: ++[suffix] returns noop
Sat Jun 11 14:40:55 2011 : Info: +- entering group accounting {...}
Sat Jun 11 14:40:55 2011 : Debug: 	expand: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d -> /var/log/freeradius/radacct/58.8.83.241/detail-20110611
Sat Jun 11 14:40:55 2011 : Info: [detail] /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/58.8.83.241/detail-20110611
Sat Jun 11 14:40:55 2011 : Debug: 	expand: %t -> Sat Jun 11 14:40:55 2011
Sat Jun 11 14:40:55 2011 : Info: ++[detail] returns ok
Sat Jun 11 14:40:55 2011 : Info: ++[unix] returns ok
Sat Jun 11 14:40:55 2011 : Debug: 	expand: %{User-Name} -> Rpp205
Sat Jun 11 14:40:55 2011 : Info: [sql] sql_set_user escaped user --> 'Rpp205'
Sat Jun 11 14:40:55 2011 : Debug: 	expand: UPDATE radacct SET ClientIPAddress='%{Client-IP-Address}',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}'  ,AcctStatusType='%{Acct-Status-Type}',NASIdentifier='%{NAS-Identifier}',stop_stamp=unix_timestamp('%S'),now_stamp=unix_timestamp('%S') WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}' -> UPDATE radacct SET ClientIPAddress='58.8.83.241',AcctStopTime = '2011-06-11 14:40:55', AcctSessionTime = '20049', AcctInputOctets = '10312906', AcctOutputOctets = '294327530', AcctTerminateCause = 'Lost-Carrier', AcctStopDelay = '', ConnectInfo_stop = ''  ,AcctStatusType='Stop',NASIdentifier='101',stop_stamp=unix_timestamp('2011-06-11 14:40:55'),now_stamp=u
nix_timestamp('2011-06-11 14:40:55') WHERE AcctSessionId = '4df2e7cc00000001' AND UserName = 'Rpp205' AND NASIPAddress = '0.0.0.0'
Sat Jun 11 14:40:55 2011 : Debug: rlm_sql (sql): Reserving sql socket id: 2
Sat Jun 11 14:40:55 2011 : Debug: WARNING: Deprecated conditional expansion ":-".  See "man unlang" for details
Sat Jun 11 14:40:55 2011 : Debug: WARNING: Deprecated conditional expansion ":-".  See "man unlang" for details
Sat Jun 11 14:40:55 2011 : Debug: 	expand: 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 ,AcctStatusType,NASIdentifier,now_stamp,ClientIPAddress) 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), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}' ,'
%{Acct-Status-Type}','%{NAS-Identifier}',unix_timestamp('%S'),'%{Client-IP-Address}') -> 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 ,AcctStatusType,NASIdentifier,now_stamp,ClientIPAddress) values('4df2e7cc00000001', '2664aa3d46f31092', 'Rpp205', '', '0.0.0.0', '1', 'Wireless-802.11', DATE_SUB('2011-06-11 14:40:55', INTERVAL (20049 + 0) SECOND), '2011-06-11 14:40:55', '20049', '', '', '', '10312906', '294327530', '68-7F-74-26-F4-00', '00-1F-3C-09-17-A1', 'Lost-Carrier', '', '', '192.168.182.14', '0', '' ,'Stop','101',unix_timestamp('2011-06-11 14:40:55'),'58.8.83.241')
Sat Jun 11 14:40:55 2011 : Debug: rlm_sql (sql): Released sql socket id: 2
Sat Jun 11 14:40:55 2011 : Info: ++[sql] returns ok
Sat Jun 11 14:40:55 2011 : Debug: 	expand: %{User-Name} -> Rpp205
Sat Jun 11 14:40:55 2011 : Debug:  attr_filter: Matched entry DEFAULT at line 12
Sat Jun 11 14:40:55 2011 : Info: ++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 43 to 58.8.83.241 port 3779
Sat Jun 11 14:40:55 2011 : Info: Finished request 1794.
Sat Jun 11 14:40:55 2011 : Info: Cleaning up request 1794 ID 43 with timestamp +3156
Sat Jun 11 14:40:55 2011 : Debug: Going to the next request
Sat Jun 11 14:40:55 2011 : Debug: Waking up in 1.8 seconds.

For this line
Debug: WARNING: Deprecated conditional expansion ":-".  See "man unlang" for details

I saw uncle Alan said that is not bug, it just warning.
but for me, it inserts new record to make wrong time record for hourly user.

This problem may appear by
1. Wrong commuting? between Freeradius and Mysql but why it appears some time some user. How can i see?? debug on this?
2. Slow Mysql update makes freeradius update fail and then make alt update by insert new record.
3. bug on freeradius-mysql
4. by my another website that use heavy mysql db.
5. or anyelse?

Thank in advance for your advice.

Best Regards
Chuan Chudabut

--
http://www.easyzonecorp.net - ????????????????????????? EasyZone Hotspot Billing, EasyZone PPPoE Billing, EasyZone Radius Billing, EasyZone VPN Billing
http://www.EasyHorpak.com - ???????????????,???????????,???????,?????
http://www.EasyHorpak.com/internet - ??????????????????????????????????????
http://www.EasyHorpak.com/move - ?????????????????????
http://www.EasyHorpak.com/software - ????????????????????????????????
http://www.efooddata.com - ??????????????????????? ?????? ?????????, ???, ?????, ???, ????, ???,??, ???, ???, ?????
http://www.thai-school.net - ????????????????????????? ??????? ????? ???????
http://www.SeamTour.com - ?????????? ??????????? ???????????, ??????????, ??????????????, ?????????, ???????, ???, ???????
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to