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:
We are seeing tons of slaves going offline and I want to see if ping interval can help.
Thanks, Jason
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
From Jenkins version 2.37, the names of these properties are slightly different:
hudson.slaves.ChannelPinger.pingInterval - Since: 1.405, Default: 5, (Deprecated since 2.37) Frequency (in minutes) of pings between the controller and agents
hudson.slaves.ChannelPinger.pingIntervalSeconds - Since: 2.37, Default: 300, Frequency of pings between the controller and agents, in seconds
hudson.slaves.ChannelPinger.pingTimeoutSeconds - Since: 2.37, Default: 240, Timeout for each ping between the controller and agents, in seconds
See a list with all "Jenkins Features Controlled with System Properties" (https://www.jenkins.io/doc/book/managing/system-properties/ )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With