Community discussions

MikroTik App
 
ZSam
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Tue May 10, 2016 6:40 pm

Usermanager Radius Timeout after reboot

Thu Apr 22, 2021 3:12 am

Hello

Usermaneger on RB750GS on FW 6.47.9 having “Radius timeout” error whenever the router is rebooted manually or other...

Note: UM is stored on external USB

Requires doing:
tool user-manager database set db-path= path
And
tool user-manager database rebuild
Which sometimes makes users authenticate again.

If not, together with this, users have to be manually deleted and re-added for them to authenticate.

Any thoughts or help would be appreciated as this is frustrating when users don’t automatically re-authenticate.

Thanks,
ZSam
 
ZSam
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Tue May 10, 2016 6:40 pm

Re: Usermanager Radius Timeout after reboot

Fri Apr 23, 2021 6:22 pm

Anyone?

Just happened again after a power loss...
 
ZSam
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Tue May 10, 2016 6:40 pm

Re: Usermanager Radius Timeout after reboot  [SOLVED]

Sat Mar 12, 2022 1:13 am

So I stayed on old firmware to avoid the problem... A few days ago I needed to replace my MT and the oldest firmware for it was one that reproduced this problem.

After digging and digging I noticed that the problem was that when a PPPoE user lost connection due to reboot or power failure etc, their dial in remained "active" in userman sessions. Thus causing a new radius connection being unable to authenticate...

I finally found this solution posted by a fellow user which solved my problem after SO long!

"Remove false active sessions via script"

viewtopic.php?p=918297#p918297
:local LastSessionUpdate;
:local SessionTimeout;
:foreach i in=[/tool user-manager session find where active=yes] do={
 
# When was the last Update of the session-informations
:set [/tool user-manager session get $i till-time]
 
# SessionTimeout is a value that tells me how many seconds ago the last update of this session was
:set ([system clock get time] - [:pick $LastSessionUpdate ([:find $LastSessionUpdate " "]+1) [:len $LastSessionUpdate]]-[/system clock get gmt-offset])
 
# if last update is more then Timeout seconds ago then close session and log it
:if ($SessionTimeout > $Timeout) do={
/tool user-manager session remove  numbers=$i
:log warning (" Removed false active session by Zaib - Username is  " . [/tool user-manager session get $i user]);
}
}

Who is online

Users browsing this forum: 5h4k4, Google [Bot], vingjfg and 83 guests