I’m using UM v5.4. When I have got a linkdown there is the problem that the UM don’t recognize that session is stopped and the session of the users are still active in UM.
So when the link is back and the users want to connect UM says that they can’t connect because it is only allowed do use the logging one time simultaneously.
Is there a sollution for that problem?
I try to script something but I have a problem. To close a session I need the number of the session. How the get the number of the session?!? See code ..
: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 LastSessionUpdate [/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 SessionTimeout ([system clock get time] - [:pick $LastSessionUpdate ([:find $LastSessionUpdate " "]+1) [:len $LastSessionUpdate]]-[/system clock get gmt-offset])
#Updates are every minute, if last update is more then 60 seconds ago then close session
:if ($SessionTimeout > 60) do={
#how to get the number from the session??
/tool user-manager session close-session numbers= ???
}
}}
Ups, yes … I never tested it in script. Because with put on the terminal I try to close the session with these values from the put. something like *e12 was the output and this didn’t work. But in the script it does!! Sometimes it could be so easy… Thanks…
Here the script if somebody need it …
#This script remove false active sessions in User Manager v5
#when the last update of the session (till-time) is to long ago then the session will be closed
#Setting Timeout in Seconds (my UserManager update session every minute),
#Timeout in Seconds, when session update is older -> session clossed
:local Timeout 60
#------------------------------------------
: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 LastSessionUpdate [/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 SessionTimeout ([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 close-session numbers=$i
:log info (" removed false active session" . [/tool user-manager session get $i user]);
}
}
I have had the same problems a lot of times, sent requests to MT support etc.
Have not seen this script until now, and it seems to work.
But this problem has been there for several years, think I had this problem in 2009!
Since it has caused me a lot of headaches
Is there not any way to fix this MT?
Pretty pretty please!
for me this script does not work, I would have friends could help us again as I have problems when the User becomes trapped in the session timeout and scored the hotspot or pppoe.
Does anyone have any more suggestions for sulucionar this problem?