Where to set the System Properties in Jenkins?
Asked Answered
P

3

5

I am exploring the EC2 plugin of Jenkins. One of the issues reported is with the Authentication Timeout.

jenkins.ec2.bootstrapAuthSleepMs (default 30000)
jenkins.ec2.bootstrapAuthTries (default 30)

I am seeing this issue with my install and I am trying to set the properties accordingly. So far without any success. Where do you increase the default timeout values for a jenkins install as suggested on the Install page?

Physiology answered 30/3, 2016 at 22:6 Comment(0)
C
8

These are regular JVM system properties. Pass them using -Denkins.ec2.bootstrapAuthSleepMs=value and -Djenkins.ec2.bootstrapAuthTries=value on Jenkins startup. You need to edit the Jenkins configuration/startup script on disk and restart Jenkins to apply the changes.

In most Jenkins installations, this is the "JAVA_ARGS" variable in the Jenkins config or startup script. On ubuntu/debian, this is configured in /etc/default/jenkins.

Catullus answered 3/4, 2016 at 19:47 Comment(2)
In Jenkins 2.7.1 on CentOS the file is /etc/sysconfig/jenkins and the variable is JENKINS_JAVA_OPTIONSTopping
I don't find sysconfig under /etc in Ubuntu 16.04, where does this exists ?Antipater
S
0

Solution that worked for me on:

Linux 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux

  1. open file /etc/systemd/system/multi-user.target.wants/jenkins.service
  2. modify value for key "Environment" for your desires
  3. # systemctl daemon-reload
  4. # service jenkins restart

now call

# ps aux | grep -i jenkins

to see, if it worked.

Sulphonate answered 19/6, 2022 at 11:3 Comment(0)
D
0

For a Windows Jenkins server, the JVM arguments can be set in file C:\Program Files\Jenkins\jenkins.xml, under the following XML element:

<service>
  <arguments>

Set properties such as -Dmail.smtp.starttls.enable=true just before the -jar parameter.

Dominance answered 25/10, 2024 at 19:11 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.