-
Notifications
You must be signed in to change notification settings - Fork 1.3k
client: fix for jetty session timeout #3658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
thx! let me test that |
|
@blueorangutan package |
|
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-334 |
|
@blueorangutan test matrix |
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
Trillian test result (tid-438)
|
|
Trillian test result (tid-439)
|
andrijapanicsb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, not working @marcaurele 😢
|
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 |
|
thx @marcaurele. @blueorangutan package |
|
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-335 |
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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);
...
}
|
@marcaurele @nvazquez - I've tested both your solutions - it works fine! (tried both setting session to 2minutes and 45 minutes) - so all good! |
|
@marcaurele please check PR #3663 |
|
@nvazquez IMO it does not look well coded to keep a reference of the |
|
@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 |
|
Guys, please let me know once you have agreed on the way forward, so I can merge this one. |
|
I have closed the other PR, I'm ok with this one |
|
@nvazquez I wish we could return multiple argument without creating a custom class in Java. Thanks for taking my point in consideration. |
86a0d41 to
428fbd3
Compare
|
Rebase done to only leave the good commit. Good for review & merge on my side. |
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-339 |
|
@blueorangutan test matrix |
|
@nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-452)
|
|
the latest code is NOT ok. |
|
@marcaurele can you try https://stackoverflow.com/a/56091476 |
|
@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 |
|
my bad, give me 2 minutes... |
|
all good @marcaurele. LGTM from my side (manual testing). |
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
merging based on 2 LGTM, manual testing and automated test results. thx @marcaurele ! |
|
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.