Uh oh!
There was an error while loading. Please reload this page.
client: fix for jetty session timeout - #3658
Conversation
andrijapanicsb
commented
Oct 31, 2019
thx! let me test that |
andrijapanicsb
commented
Oct 31, 2019
@blueorangutan package |
blueorangutan
commented
Oct 31, 2019
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 31, 2019
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-334 |
andrijapanicsb
commented
Oct 31, 2019
@blueorangutan test matrix |
blueorangutan
commented
Oct 31, 2019
@andrijapanicsb a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
nvazquez
left a comment
There was a problem hiding this comment.
Hi @marcaurele thanks for the changes. I tested this but unfortunately I couldn't see any difference after changing the value on server.properties and restarting the management server
blueorangutan
commented
Nov 1, 2019
Trillian test result (tid-438)
|
blueorangutan
commented
Nov 1, 2019
Trillian test result (tid-439)
|
andrijapanicsb
left a comment
There was a problem hiding this comment.
Unfortunately, not working @marcaurele 😢
marcaurele
commented
Nov 3, 2019
I did some testing on a simple server and I had to set the timeout after the server was started. I pushed an update, let me know if it's working now @andrijapanicsb |
andrijapanicsb
commented
Nov 3, 2019
thx @marcaurele. @blueorangutan package |
blueorangutan
commented
Nov 3, 2019
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 3, 2019
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-335 |
nvazquez
left a comment
There was a problem hiding this comment.
Thanks @marcaurele, this is working now but I think it can be improved a bit:
Instead of creating a pair to pass the sessionHandler, it can be defined as a variable and set the timeout after the server starts, reducing the lines of code:
private SessionHandler sessionHandler;
...
private HandlerCollection createHandlers() {
...
sessionHandler = webApp.getSessionHandler();
...
}
public void start() {
...
server.start();
// Must set the session timeout after the server has started
sessionHandler.setMaxInactiveInterval(sessionTimeout * 60);
...
}
andrijapanicsb
commented
Nov 4, 2019
@marcaurele@nvazquez - I've tested both your solutions - it works fine! (tried both setting session to 2minutes and 45 minutes) - so all good! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nvazquez
commented
Nov 4, 2019
@marcaurele please check PR #3663 |
marcaurele
commented
Nov 4, 2019
@nvazquez IMO it does not look well coded to keep a reference of the |
nvazquez
commented
Nov 4, 2019
@marcaurele no urgency, was trying to propose an improvement and tried with the comments but thought those were not being added until I click Submit on the review. So I created the PR for clarity but didn't realise the comments were already added, please discard them. Thanks for the fix |
andrijapanicsb
commented
Nov 5, 2019
Guys, please let me know once you have agreed on the way forward, so I can merge this one. |
nvazquez
commented
Nov 5, 2019
I have closed the other PR, I'm ok with this one |
marcaurele
commented
Nov 5, 2019
@nvazquez I wish we could return multiple argument without creating a custom class in Java. Thanks for taking my point in consideration. |
86a0d41 to
428fbd3Comparemarcaurele
commented
Nov 5, 2019
Rebase done to only leave the good commit. Good for review & merge on my side. |
nvazquez
commented
Nov 5, 2019
@blueorangutan package |
blueorangutan
commented
Nov 5, 2019
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 5, 2019
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-339 |
nvazquez
commented
Nov 5, 2019
@blueorangutan test matrix |
blueorangutan
commented
Nov 5, 2019
@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
blueorangutan
commented
Nov 6, 2019
Trillian test result (tid-452)
|
andrijapanicsb
commented
Nov 6, 2019
the latest code is NOT ok. |
yadvr
commented
Nov 6, 2019
@marcaurele can you try https://stackoverflow.com/a/56091476 |
marcaurele
commented
Nov 6, 2019
@andrijapanicsb weird as I don't see any difference so far from the previous 2 commits. Can you double check you're using the right branch and cleared up the compiled classes of the client module, just in case. @rhtyd that's what it's doing, but I found out that the session must be set after doing the |
andrijapanicsb
commented
Nov 6, 2019
my bad, give me 2 minutes... |
andrijapanicsb
commented
Nov 6, 2019
all good @marcaurele. LGTM from my side (manual testing). |
andrijapanicsb
commented
Nov 6, 2019
merging based on 2 LGTM, manual testing and automated test results. thx @marcaurele ! |
marcaurele
commented
Nov 6, 2019
For the record, this is the small embedded app to validate: https://github.com/marcaurele/embedded-jetty-uber-jar/tree/session-test |
fixed inability to set a custom session duration via server.properties on mgmt server.
fixed inability to set a custom session duration via server.properties on mgmt server.
Description
Related to #2329 (comment) the session timeout is not taken into account. This change creates a session handler explicitly and the timeout value should be correctly taken into account.
Types of changes
How Has This Been Tested?
This has not been tested yet.