radsqlrelay: incorrect datetime error reading sql-relay file

I Want Wireless iwantwireless at gmail.com
Sun Nov 27 18:55:26 CET 2016


FreeRadius 2.2.8 running on Ubuntu 14.04 LTS

sql_log is enabled in the accounting section of /sites-enabled/default

When I execute radsqlrelay it repeatedly dumps the following error to the
screen and no records are created on the target server

/usr/bin/radsqlrelay -x  -1 -b radius -d mysql -h xxx.xxx.xxx.xxx -u
radrelay_user -p somepassword /var/log/freeradius/radacct/sql-relay


Incorrect datetime value: '0' for column 'acctstarttime' at row 1
Incorrect datetime value: '0' for column 'acctstarttime' at row 1
Incorrect datetime value: '0' for column 'acctstarttime' at row 1


And indeed the file shows this:

head /var/log/freeradius/radacct/sql-relay

INSERT INTO radacct (AcctSessionId, UserName,    NASIPAddress,
FramedIPAddress, AcctStartTime, AcctStopTime,     AcctSessionTime,
AcctTerminateCause) VALUES   ('810001a7', 'acct203', 'xxx.xxx.37.1',
   'xxx.xxx.3.50', '0', '0', '4801','');
INSERT INTO radacct (AcctSessionId, UserName,    NASIPAddress,
FramedIPAddress, AcctStartTime, AcctStopTime,     AcctSessionTime,
AcctTerminateCause) VALUES   ('810001a6', 'acct2150', 'xxx.xxx.37.1',
   'xxx.xxx.3.16', '0', '0', '5400','');


But I am also logging to a local sql database and I see account start times
there

acctsessionid  acctuniqueid  username  nasipaddress nasportid nasporttype
acctstarttime acctstoptime acctsessiontime

810001a7 b051e93c387cc6be acct2203 xxx.xxx.37.1 15729080 Ethernet 2016-11-27
11:09:51 *NULL* 4801
810001a6 830d03bc3cbe59de acct2150 xxx.xxx.37.1 15729079 Ethernet 2016-11-27
11:03:00 *NULL* 5400


I  must be missing something but I can find very little info on radsqlrelay
other than the man


Thanks,
Ian


More information about the Freeradius-Users mailing list