Disable pinging slaves in Jenkins

amazon-ec2, jenkins, plugins, system-properties

Solution

At the master node, you can change the system property under `/etc/sysconfig/jenkins`

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.remoting.Launcher.pingIntervalSec=-1"

you can set the system property when you are running the slave (via JNPL):

java -Dhudson.remoting.Launcher.pingIntervalSec=-1 -jar slave.jar -jnlpUrl <Jenkins root URL>

-K

Problem

So, we are seeing tons of our EC2 slaves go offline (using EC2 plugin). So to debug it I am trying to disabe pinging thread based on the article Pinging thread where they talk about disabling the ping thread on the master JVM on a running jenkins using: Jenkins.instance.injector.getInstance(hudson.slaves.ChannelPinger.class).@pingInterval = -1 and to disable slaves from pinging the master, the system property -Dhudson.remoting.Launcher.pingIntervalSec=-1 needs to be set to slaves. Questions: - Where and how do I add the pingInterval value to -1? - How and where do I set the system property for pingIntervalSec=-1 We are seeing tons of slaves going offline and I want to see if ping interval can help. Thanks, Jason

Original source