Specifying Jenkins startup parameters

2,404 views
Skip to first unread message

David Aldrich

unread,
Nov 10, 2017, 7:12:39 AM11/10/17
to jenkins...@googlegroups.com

Hi

 

We typically restart Jenkins using 'Restart Safely' from the root menu. We now want to specify the session timeout using a startup parameter:

 

java -jar jenkins.war --sessionTimeout=10080

 

How do people typically specify startup parameters?  Should I use a script and never restart from the root menu?

 

Best regards

 

David

 

Mark Waite

unread,
Nov 13, 2017, 8:47:08 PM11/13/17
to jenkins...@googlegroups.com
It depends on the context where you're running that server.  Refer to https://jenkins.io/download/ for the current list of platform specific installers and the instructions to use them.

If you're running on a Debian or Ubuntu server, you should be able to modify the command line arguments in /etc/defaults/jenkins.  See https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu for more details.

If you're running on a CentOS, Red Hat or OpenSUSE, you should be able to modify the command line arguments in /etc/sysconfig/jenkins.  See https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions 

If you're running on Windows, there is a configuration file written to the installation directory which can be changed.  See https://wiki.jenkins.io/display/JENKINS/Thanks+for+using+Windows+Installer 

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/557da4dd82ef430080659b8415e81275%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

David Aldrich

unread,
Nov 14, 2017, 4:46:17 AM11/14/17
to jenkins...@googlegroups.com

Hi Mark

 

Thanks for your reply.  I’m working on Centos 5, so I set the last line of /etc/sysconfig/jenkins to:

 

JENKINS_ARGS="--prefix=/jenkins --sessionTimeout=540"

 

I then restarted Jenkins using root menu > Restart Safely.  After ~30mins inactivity I had to log in to Jenkins again.

 

Do you have any ideas why this is not working for me please?

 

Best regards

 

David

 


For more options, visit https://groups.google.com/d/optout.

Click here to report this email as spam.

Mark Waite

unread,
Nov 14, 2017, 6:46:50 AM11/14/17
to jenkins...@googlegroups.com

I believe the safe restart does not execute the operating system level startup scripts.  You need the operating system level restart,  like /etc/init.d/jenkins restart.

Mark Waite


David Aldrich

unread,
Nov 14, 2017, 6:52:39 AM11/14/17
to jenkins...@googlegroups.com

Ok, thanks Mark.

 

David

 

Reply all
Reply to author
Forward
0 new messages