Skip to content
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

Jenkins session timeout configuration? #189

Closed
BogdanSorlea opened this issue Nov 6, 2019 · 2 comments
Closed

Jenkins session timeout configuration? #189

BogdanSorlea opened this issue Nov 6, 2019 · 2 comments

Comments

@BogdanSorlea
Copy link

Hey,

In short, no matter how much I tried digging into the matter, I couldn't come up with any lead on how to achieve this.

In short, I would like Jenkins to maintain log-in sessions for longer - customisable. However, because (as far as I know) the session timeout needs to be passed to the container (Jetty) upon its run (or be written in its config file), which happens way before Jenkins runs, no Configuration-as-Code or Groovy-based approach would help.

I fully understand that this might be a question more for the https://github.com/jenkinsci/jenkins repo, but it does not seem possible to report issues there.

I dug into the Dockerfile code (and corresponding entrypoint script) in aforementioned script, but I didn't seem to take in any env var or something like that for the parameter in question.

So my guess is that the Jenkins docker image would require adjustments - which I don't think I have the time to contribute to - but in case there is some other way I can't immediately see, please let me know.

Thanks.

@tomaszsek
Copy link

Hi @BogdanSorlea,

Add JENKINS_OPTS env to the jenkins master container with value --sessionTimeout=1440 --sessionEviction=43200.

https://stackoverflow.com/questions/26407541/increase-the-jenkins-login-timeout
https://github.com/jenkinsci/docker#passing-jenkins-launcher-parameters

Cheers

@BogdanSorlea
Copy link
Author

Hey,

Thanks for the heads up. I didn't realise the docker stuff resides in the jenkinsci/docker repo instead of the jenkinsci/jenkins repo, so I missed that part of the documentation.

I employed the solution you pointed to and it seems to be working, at least the sessionTimeout part (haven't fully tested the sessionEviction part, but it's less critical anyways, so I consider this to be ok for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants