Information not getting into MySQL - UPDATE to radacct
Hi All, I'm using FreeRadius with an ACME NetNet SD. I can see the accounting requests arrive at free radius and it seems to be writing to the MySQL with an UPDATE method yet I never see any information get into the DB. An Example from radius -X rad_recv: Accounting-Request packet from host 10.57.19.30:1103, id=0, length=105 Acct-Status-Type = Accounting-On NAS-IP-Address = 192.168.1.10 NAS-Port = 0 Acct-Session-Id = "SiphonLab#788" Acme-Firmware-Version = "SC6.1.0 MR-1 Patch 4 (Build 348)" Acme-CDR-Sequence-Number = 3938 Processing the preacct section of radiusd.conf modcall: entering group preacct for request 3 modcall[preacct]: module "preprocess" returns noop for request 3 rlm_acct_unique: WARNING: Attribute User-Name was not found in request, unique ID MAY be inconsistent rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address = 10.57.19.30,NAS-IP-Address = 192.168.1.10,Acct-Session-Id = "SiphonLab#788",' rlm_acct_unique: Acct-Unique-Session-ID = "4ba5092db9c79961". modcall[preacct]: module "acct_unique" returns ok for request 3 rlm_realm: Proxy reply, or no User-Name. Ignoring. modcall[preacct]: module "suffix" returns noop for request 3 modcall[preacct]: module "files" returns noop for request 3 modcall: leaving group preacct (returns ok) for request 3 Processing the accounting section of radiusd.conf modcall: entering group accounting for request 3 radius_xlat: '/var/log/radius/radacct/10.57.19.30/detail' rlm_detail: %A/%{Client-IP-Address}/detail expands to /var/log/radius/radacct/10.57.19.30/detail modcall[accounting]: module "detail" returns ok for request 3 modcall[accounting]: module "unix" returns noop for request 3 radius_xlat: '/var/log/radius/radutmp' rlm_radutmp: NAS 192.168.1.10 restarted (Accounting-On packet seen) modcall[accounting]: module "radutmp" returns ok for request 3 rlm_sql (sql): received Acct On/Off packet radius_xlat: 'UPDATE radacct SET AcctStopTime='2010-03-19 14:10:15', AcctSessionTime=unix_timestamp('2010-03-19 14:10:15') - unix_timestamp(AcctStartTime), AcctTerminateCause='', AcctStopDelay = '' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '192.168.1.10' AND AcctStartTime <= '2010-03-19 14:10:15'' radius_xlat: '/var/log/radius/sqltrace.sql' rlm_sql (sql): Reserving sql socket id: 0 rlm_sql_mysql: query: UPDATE radacct SET AcctStopTime='2010-03-19 14:10:15', AcctSessionTime=unix_timestamp('2010-03-19 14:10:15') - unix_timestamp(AcctStartTime), AcctTerminateCause='', AcctStopDelay = '' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '192.168.1.10' AND AcctStartTime <= '2010-03-19 14:10:15' rlm_sql (sql): Released sql socket id: 0 modcall[accounting]: module "sql" returns ok for request 3 modcall: leaving group accounting (returns ok) for request 3 Sending Accounting-Response of id 0 to 10.57.19.30 port 1103 However no data is getting to the DB mysql> select * from radacct; Empty set (0.00 sec) If I try the update in MySQL it does not populate mysql> UPDATE radacct SET AcctStopTime='2010-03-19 11:55:14', AcctSessionTime=unix_timestamp('2010-03-19 11:55:14') - unix_timestamp(AcctStartTime), AcctTerminateCause='', AcctStopDelay = '' WHERE AcctSessionTime=0 AND AcctStopTime=0 AND NASIPAddress= '192.168.1.10' AND AcctStartTime <= '2010-03-19 11:55:14'; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 Anyone seen this problem? Any help much appreciated Regards Steve P
Steve. Parfitt (Siphon) wrote:
I can see the accounting requests arrive at free radius and it seems to be writing to the MySQL with an UPDATE method yet I never see any information get into the DB.
This is largely a MySQL question. FreeRADIUS is doing an UPDATE. An UPDATE to fields that don't exist results in... nothing happening.
rad_recv: Accounting-Request packet from host 10.57.19.30:1103, id=0, length=105 Acct-Status-Type = Accounting-On
This means that the NAS rebooted. The UPDATE query is trying to close all open sessions. It doesn't do anything because there are no open sessions. There's nothing to worry about. Alan DeKok.
participants (2)
-
Alan DeKok -
Steve. Parfitt (Siphon)