Session Expiration not work?

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
domxuanhoa
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Mon Sep 25, 2017 8:23 am

Session Expiration not work?

Post by domxuanhoa » Mon Sep 25, 2017 8:59 am

Dear all,

I just installed OpenKM on Windows (OpenKM Comunity 6.3.4 and OS window 7, Tomcat-7.0.61)
I have a problem with session expiration. According to the forum.openkm.com reference, I have added in web.xml file located in the directory : tomcat \ webapps \ OpenKM.war

Code: Select all

<session-config>
   <session-timeout> 5</ session-timeout>
</ session-config>
However, this does not work. The user log on and leave nothing active from morning to afternoon session still

And second problem: when user finish log in, if I stop application OpenKM and restart app, on user's web browser appear notification:

Error when communicating with server (getUpdateMassage)

But user jut refresh web brower to relogin without type user & pw

Please help me !

Thank you !

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

Re: Session Expiration not work?

Post by jllort » Tue Sep 26, 2017 3:02 pm

Increase the values of keep.session.alive.interval, schedule.session.keepalive and schedule.dashboard.refresh. More information about these parameters at
https://docs.openkm.com/kcenter/view/ok ... eters.html ( I suggest increase to a value higher of 5 ). Consider during more than 5 minutes you should not click on any openkm UI button etc... otherwise the count will be 0 again.

domxuanhoa
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Mon Sep 25, 2017 8:23 am

Re: Session Expiration not work?

Post by domxuanhoa » Wed Oct 04, 2017 3:18 am

Thks for your reply !

I was set values of:

Code: Select all

keep.session.alive.interval: 5
schedule.session.keepalive: 15
schedule.dashboard.refresh: 30
But user's session still not expire (not click on any openkm UI button etc...).

Do I need to do something else?

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

Re: Session Expiration not work?

Post by jllort » Thu Oct 05, 2017 6:33 am

Session will expire when after 30 minutes ( if you have not changed web.xml ) has not been done any connection. To prevent losing session while OpenKM UI is openned there's a background process - named keep alive - what periodically is called to prevent session losing. The values of the methods you have set after should be greater than session to do not keep alive, otherwise this methods will be executed periodically and the session will never be closed.

domxuanhoa
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Mon Sep 25, 2017 8:23 am

Re: Session Expiration not work?

Post by domxuanhoa » Mon Oct 09, 2017 3:34 am

hi,
I followed your instructions as follows:
- in file web.xml:

Code: Select all

<session-config>
<session-timeout> 5</ session-timeout>
</ session-config>
- in Configuration:

Code: Select all

keep.session.alive.interval: 30
schedule.session.keepalive: 30
schedule.dashboard.refresh: 30
but still nothing other than before configuration
Please support me in this case
Thks !

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

Re: Session Expiration not work?

Post by jllort » Tue Oct 10, 2017 11:27 am

Might be the problem is with the Popup Notification what check for news each minute. Take a look at WorkspaceUserProperties.java line 473. Try to disable it. Might be something what is refreshing the UI, consider you must do not touch the UI during more than 5 minutes to check if the session has been expired.

domxuanhoa
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Mon Sep 25, 2017 8:23 am

Re: Session Expiration not work?

Post by domxuanhoa » Thu Oct 12, 2017 2:30 am

Hi jllort,

Thank for your support !

I'm not coder so that I don't know about java code. Do you have other guide for me?

Thks !

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

Re: Session Expiration not work?

Post by jllort » Sat Oct 14, 2017 3:14 pm

No, seems it is needed code changes or at least audit why is not closing the session. Really our effors has been going in direction of preventing session close, because on AJAX scenario ( the frontend UI ) where several threads ( javascript ) are on execution in parallel only one of them periodically or several in combination do some query to the server, the session set the time again to zero. I think changing the parameters as I indicated in one of the previous should be enought, but for what you are telling is not the case. Can you try something to be sure the web.xml change you have applied has really been done.
1- Authenticate to OpenKM/admin ( this is not an AJAX application ) if after 7 minutes you refresh the url in the browser the session should be lost. If it not happens then I suspect your web.xml change might be is missing.

Post Reply

Who is online

Users browsing this forum: Manikandarajans and 2 guests