ROS 6.10 - User Manager - log file has been lost

Dear all,

after an upgrade from RouteriOS v. 5.20 to v.6.10 on my RB450 I noticed the following issue in the system log:

Feb/27/2014 19:41:31 manager,error,info,debug mtstar.vigo.bigip.it: failed to add log: unable to open database file

I tried the following commands:

[admin@mtstar.vigo.bigip.it] > /tool user-manager database rebuild-log
Can take a while. Console may not respond while in progress. Rebuild user-manager log database? [y/N]:
y
Rebuilding user-manager log database
File does not exist!
[admin@mtstar.vigo.bigip.it] > /tool user-manager database clear-log
Dangerous! Reset user-manager log database? [y/N]:
y
Resetting user-manager log database
Failed to reset user-manager log database
File does not exist!

This is the error detail:

Feb/27/2014 19:47:49 manager,debug mtstar.vigo.bigip.it: database rebuilt successfully, took 14s
Feb/27/2014 19:47:49 manager,debug mtstar.vigo.bigip.it: db rebuilt
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: failed to run SQL <CREATE TABLE log (id INTEGER PRIMARY KEY, custId INTEGER NOT NULL, userId INTEGER, userName TEXT, nasPort INTEGER, nasPortType INTEGER, nasPortId TEXT, callingStationId BLOB, ipUser BLOB, ipRouter BLOB, acctSessionId TEXT, eventTime INTE
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: GER, status INTEGER, descr TEXT);>: unable to open database file
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: dosql error: failed to run SQL <CREATE TABLE log (id INTEGER PRIMARY KEY, custId INTEGER NOT NULL, userId INTEGER, userName TEXT, nasPort INTEGER, nasPortType INTEGER, nasPortId TEXT, callingStationId BLOB, ipUser BLOB, ipRouter BLOB, acctSessionId TEXT, e
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: ventTime INTEGER, status INTEGER, descr TEXT);>: unable to open database file
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: dosql error: failed to prepare <run SQL <CREATE INDEX log_acct_index ON log (acctSessionId, ipRouter, nasPortType, status);>>: invalid SQL: no such table: main.log
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: dosql error: failed to prepare <run SQL <CREATE INDEX log_custuser_index ON log (custId, userId);>>: invalid SQL: no such table: main.log
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: dosql error: failed to prepare <run SQL <CREATE INDEX log_user_index ON log (userId);>>: invalid SQL: no such table: main.log
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: dosql error: failed to prepare <run SQL <ANALYZE log;>>: invalid SQL: no such table: log
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: table log is corrupted: failed to prepare <find max(log.id)>: invalid SQL: no such table: log
Feb/27/2014 19:47:49 manager,error,info,debug mtstar.vigo.bigip.it: table log is corrupted: failed to prepare <find count(log)>: invalid SQL: no such table: log
Feb/27/2014 19:47:49 manager,debug mtstar.vigo.bigip.it: creating missing payments
Feb/27/2014 19:47:49 manager,debug mtstar.vigo.bigip.it: checking profile boundaries
Feb/27/2014 19:47:49 manager,debug mtstar.vigo.bigip.it: updating profile time fields for users...
Feb/27/2014 19:47:50 manager,debug mtstar.vigo.bigip.it: 0 user(s) changed
Feb/27/2014 19:47:50 manager,debug mtstar.vigo.bigip.it: updating user money fields

I believe the SQL error about “create table log” is the hearth of the question.

Can some one help me?

Greeted in advance.

Do at you own risk:

  1. save your actual database (if the database is corrupted, it still corrupted after all!!!)
/tool user-manager database save name=exdata
  1. Uninstall user-manager package and reboot (NOT DISABLE, UNINSTALL!)

  2. Re-install user-manager and reboot.

  3. re-import previous database

/tool user-manager database load name=exdata
  1. run
/tool user-manager log remove [find]
/tool user-manager database clear-log
y
/tool user-manager database rebuild
y
  1. Cross your fingers…

By.

It has worked!

Thank you very much rextended!

Thanks for karma! :sunglasses:

By.

Increible thanks so much, a lot of time looking for something like this.

Yours,
Claudio,