Automatic logout

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
seregaxvm
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Oct 25, 2018 7:22 am

Automatic logout

Post by seregaxvm » Thu Oct 25, 2018 7:29 am

Is there a way to automatically logout after a certain period of inactivity?

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Automatic logout

Post by jllort » Fri Oct 26, 2018 9:35 pm

By default, tomcat session expires in 30 minutes. OpenKM has a keep alive call from browser to the application used to refresh the session.

Consider two options or the combination of both:
Change tomcat session -> https://docs.openkm.com/kcenter/view/ok ... meout.html
Change keep alive values of the parameters -> https://docs.openkm.com/kcenter/view/ok ... eters.html
schedule.session.keepalive
keep.session.alive.interval
schedule.dashboard.refresh
schedule.ui.notification

seregaxvm
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Oct 25, 2018 7:22 am

Re: Automatic logout

Post by seregaxvm » Sat Oct 27, 2018 8:59 am

schedule.session.keepalive property description says:
For this reason, it should never be lower than server session timeout
Wouldn't it be the other way around?

seregaxvm
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Oct 25, 2018 7:22 am

Re: Automatic logout

Post by seregaxvm » Sat Oct 27, 2018 9:46 am

I have the following testing parameters:

Code: Select all

session-timeout=5
schedule.session.keepalive=3
keep.session.alive.interval=3
schedule.dashboard.refresh=3
schedule.ui.notification=1
but the session does not close.

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Automatic logout

Post by jllort » Sun Oct 28, 2018 6:10 pm

The scheduler values must be greater than the session. The idea is the scheduler refresh the session if the period is greater than the session then will expire. Also must consider the worse scenario:

The session is set to 30 minutes
The scheduler is set to 40 minutes
Start the clock at 0 -> the last action has been done at the minute 29 -> that means the new session window expires at 29+39=50, in minute 40 the scheduler refresh the session, now the next expiration will be at minute 40+30=70 ( hope you follow the logic )

seregaxvm
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Oct 25, 2018 7:22 am

Re: Automatic logout

Post by seregaxvm » Mon Oct 29, 2018 8:10 am

It's just strange that the schedule.session.keepalive default value is 5 and session-timeout is 15 (or 30 according to this link https://docs.openkm.com/kcenter/view/ok ... meout.html). However these settings do not work either.
Also, I receive these warnings:

Code: Select all

[Thread-29] WARN  com.openkm.core.Cron - Crontab task mail address is empty: Return: null
It seems relevant.
P.S. I use https://hub.docker.com/r/openkm/openkm/ image.

jllort
Moderator
Moderator
Posts: 10834
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Automatic logout

Post by jllort » Wed Oct 31, 2018 10:08 pm

You should increase all the schedulers to 60 or 120 ( minutes ). Login into OpenKM, do not touch anything and wait for 40-50 minutes.

Post Reply