On Sun, March 17, 2019 7:25 pm, Matthew Newton wrote:
On Sun, 2019-03-17 at 12:35 +0530, Somanath Mishra wrote:
'%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event -Timestamp}), \ FROM_UNIXTIME(%{integer:Event -Timestamp}), \
...
servicetype, framedprotocol, framedipaddress) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User- Name}', '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}', %{%{integer:Event-Timestamp}:-date('now')}, %{%{integer:Event-Timestamp}:-date('now')}, NULL, '0',
You need to find out what config file FreeRADIUS is actually using, because it's not using the one you quoted above. The query is different.
-- Matthew
so i did fresh installation of V3.0.18 from docker hub.... still have same issue "Incorrect datetime value: '1552831358' for column 'acctstarttime' at row 1" error.. Here are Logs: freeradius | (6) sql: --> 98789@@TM11 freeradius | (6) sql: SQL-User-Name set to '98789@@TM11' freeradius | (6) sql: EXPAND INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, framedipv6address, framedipv6prefix, framedinterfaceid, delegatedipv6prefix) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Port-ID}:-%{NAS-Port}}', '%{NAS-Port-Type}', %{%{integer:Event-Timestamp}:-date('now')}, %{%{integer:Event-Timestamp}:-date('now')}, NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Framed-IPv6-Address}', '%{Framed-IPv6-Prefix}', '%{Framed-Interface-Id}', '%{Delegated-IPv6-Prefix}') freeradius | (6) sql: --> INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, framedipv6address, framedipv6prefix, framedinterfaceid, delegatedipv6prefix) VALUES ('1801000A-000B2EFA', 'a7b6b2a2756c0cca834f46639edde9bf', '98789@@TM11', '', '192.168.0.4', '0', 'Wireless-802.11', 1552831358, 1552831358, NULL, '0', 'RADIUS', 'CONNECT Unknown Radio', '', '0', '0', '00:0c:29:67:6d:ec', '9c:4e:36:9c:71:18', '', '', '', '10.0.1.24', '', '', '', '') freeradius | (6) sql: Executing query: INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctupdatetime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, framedipv6address, framedipv6prefix, framedinterfaceid, delegatedipv6prefix) VALUES ('1801000A-000B2EFA', 'a7b6b2a2756c0cca834f46639edde9bf', '98789@@TM11', '', '192.168.0.4', '0', 'Wireless-802.11', 1552831358, 1552831358, NULL, '0', 'RADIUS', 'CONNECT Unknown Radio', '', '0', '0', '00:0c:29:67:6d:ec', '9c:4e:36:9c:71:18', '', '', '', '10.0.1.24', '', '', '', '') freeradius | (6) sql: ERROR: rlm_sql_mysql: ERROR 1292 (Incorrect datetime value: '1552831358' for column 'acctstarttime' at row 1): 22007 freeradius | (6) sql: SQL query returned: server error freeradius | rlm_sql (sql): Released connection (10) freeradius | Need 6 more connections to reach 10 spares freeradius | rlm_sql (sql): Opening additional connection (14), 1 of 28 pending slots used freeradius | rlm_sql_mysql: Starting connect to MySQL server freeradius | rlm_sql_mysql: Connected to database 'radius' on 172.25.0.100 via TCP/IP, server version 5.7.25, protocol version 10 freeradius | (6) [sql] = fail freeradius | (6) } # accounting = fail freeradius | (6) Not sending reply to client. freeradius | (6) Finished request freeradius | (6) Cleaning up request packet ID 99 with timestamp +172 freeradius | Waking up in 0.9 seconds. freeradius | (3) Cleaning up request packet ID 97 with timestamp +168 freeradius | Ready to process requests and in queries.conf file we have : start { # # Insert a new record into the sessions table # query = "\ INSERT INTO ${....acct_table1} \ (${...column_list}) \ VALUES \ ('%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{Realm}', \ '%{NAS-IP-Address}', \ '%{%{NAS-Port-ID}:-%{NAS-Port}}', \ '%{NAS-Port-Type}', \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ FROM_UNIXTIME(%{integer:Event-Timestamp}), \ NULL, \ '0', \ '%{Acct-Authentic}', \ '%{Connect-Info}', \ '', \ '0', \ '0', \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ '', \ '%{Service-Type}', \ '%{Framed-Protocol}', \ '%{Framed-IP-Address}', \ '%{Framed-IPv6-Address}', \ '%{Framed-IPv6-Prefix}', \ '%{Framed-Interface-Id}', \ '%{Delegated-IPv6-Prefix}')" still have confusion why it is throwing error????please help...Is there any issue with docker hub freeradius server files???