'freeradius doesn't response to accounting packets

I'm using Freeradius for my Radius Server project as the server and the Mysql as the database and daloradius for the web interface for billing and accounting.

I am using this server for the AAA of my Mikrotik router. There is no problem with the authentication and authorization of users when using ssh to MikroTik or winbox connection. but when Mikrotik sends the accounting packets the server doesn't send any ack packets to the router and also doesn't save accounting records in the database. there is a screenshot of the Wireshark which is monitoring radius packets

and as you see there is no response after accepting the user authentication request.

then I tried to see a log of freeradius while sending the requests I ran this command

freeradius -X

and here is what I found :

(4) sql: ERROR: rlm_sql_mysql: ERROR 1054 (Unknown column 'acctupdatetime' in 'field `list'): 42S22`
(4) sql: SQL query returned: server error
rlm_sql (sql): Released connection (6)
(4)     [sql] = fail
(4)   } # accounting = fail
(4) Not sending reply to client.
(4) Finished request

I used the Freeradius Mysql schema samples in the Freeradius directory for making the database.

any idea?



Solution 1:[1]

table radacct is missing "acctupdatetime" column.

Here is the commands to rebuild this table with "acctupdatetime" for DaloRadius using MYSQL.

DROP TABLE radacct;
CREATE TABLE radacct (
radacctid bigint(21) NOT NULL auto_increment,
acctsessionid varchar(64) NOT NULL default '',
acctuniqueid varchar(32) NOT NULL default '',
username varchar(64) NOT NULL default '',
groupname varchar(64) NOT NULL default '',
realm varchar(64) default '',
nasipaddress varchar(15) NOT NULL default '',
nasportid varchar(15) default NULL,
nasporttype varchar(32) default NULL,
acctstarttime datetime NULL default NULL,
acctupdatetime datetime NULL default NULL,
acctstoptime datetime NULL default NULL,
acctinterval int(12) default NULL,
acctsessiontime int(12) unsigned default NULL,
acctauthentic varchar(32) default NULL,
connectinfo_start varchar(50) default NULL,
connectinfo_stop varchar(50) default NULL,
acctinputoctets bigint(20) default NULL,
acctoutputoctets bigint(20) default NULL,
calledstationid varchar(50) NOT NULL default '',
callingstationid varchar(50) NOT NULL default '',
acctterminatecause varchar(32) NOT NULL default '',
servicetype varchar(32) default NULL,
framedprotocol varchar(32) default NULL,
framedipaddress varchar(15) NOT NULL default '',
PRIMARY KEY (radacctid),
UNIQUE KEY acctuniqueid (acctuniqueid),
KEY username (username),
KEY framedipaddress (framedipaddress),
KEY acctsessionid (acctsessionid),
KEY acctsessiontime (acctsessiontime),
KEY acctstarttime (acctstarttime),
KEY acctinterval (acctinterval),
KEY acctstoptime (acctstoptime),
KEY nasipaddress (nasipaddress)
) ENGINE = INNODB;
exit;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marc Wolf