1.1.7 and rlm_sql_mysql duplicated query
Georgi Alexandrov
aether at abv.bg
Sun Feb 17 23:13:48 CET 2008
Hello,
I'm seeing duplicated queries made to the database when any (linux/pppoe) user logs in through freeradius 1.1.7. Log from mysql logger:
646 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, XAscendSessionSvrKey) VALUES ('47B769162F4300', '66cf2392669a4dc6', 'time160', '', 'xx.xx.xxx.22', '0', 'Async', '2008-02-17 00:52:10', '0', '0', 'RADIUS', '', '', '0', '0', '', '00:13:20:xx.xx.xx', '', 'Framed-User', 'PPP', 'xx.xx.xxx.110', '0', '0', '')
645 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, XAscendSessionSvrKey) VALUES ('47B7691A2F4301', '82cd8d24e280bd07', 'time160', '', 'xx.xx.xx.22', '0', 'Async', '2008-02-17 00:52:10', '0', '0', 'RADIUS', '', '', '0', '0', '', '00:13:20:xx.xx.xx', '', 'Framed-User', 'PPP', 'xx.xx.xx.110', '0', '0', '')
After user logs off the following query is passed to mysql:
080217 0:54:21 663 Query UPDATE radacct SET AcctStopTime = '2008-02-17 00:54:21', AcctSessionTime = '135', AcctInputOctets = '0' << 32 | '2556', AcctOutputOctets = '0' << 32 | '1486', AcctTerminateCause = 'User-Request', AcctStopDelay = '0', ConnectInfo_stop = '' WHERE AcctSessionId = '47B7691A2F4301' AND UserName = 'time160' AND NASIPAddress = 'xx.xx.xx.22'
So when the user logs I have two queries inserting similar data with different sessions ids:
47B7691A2F4300 and 47B7691A2F4301
And when the user logs off I have only one query that notes the action in the database for session 47B7691A2F4301. So generally I get one "hanging" session in radacct table for a particular user where AcctStopTime is null.
sql.conf is a default one with only db connect info changed. Tried to remove some of the insert statements but the only result I'm getting is no insert statement in radacct table at all or the double insert statement pointed above.
I would really appreciate some guidance from this point on as I'm pretty much out of ideas.
Thanks upfront
More information about the Freeradius-Users
mailing list