Any kind of communication issue between Jenkins master and a dedicated JNLP agent.
This article describes how to collect the minimum required information for communication issues between a Jenkins master and an agent so that it can be efficiently troubleshooted.
If the required data is bigger than 20 MB you will not be able to use ZenDesk to upload all the information. On this case we would like to encourage you to use our upload service in order to attach all the required information.
- CloudBees Jenkins Platform (CJP)
- Operations Center (OC)
- Client Master (CM)
- CloudBees Jenkins Enterprise (CJE)
[ ] Support bundle
[ ] Agent name
[ ] Agent config.xml
[ ] Agent logs
[ ] Master logs
[ ] Process lists in the JNLP agent machine
[ ] Connectivities checks
A support bundle from the Jenkins instance after the issue is exposed. Please, follow the KB below in case you don’t know how to generate a support bundle.
The name of the agent under Manage Jenkins -> Manage Nodes
It is possible to access to the agent config.xml from the UI. You just need to add at the end of the item URL
config.xml. i.e http://<JENKINS_URL>/computer/<AGENT_NAME>/config.xml
<slave> <name>new-node</name> <description/> <remoteFS>/Users/fbelzunc/jnlp-agent</remoteFS> <numExecutors>1</numExecutors> <mode>NORMAL</mode> <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/> <launcher class="hudson.slaves.JNLPLauncher"/> <label/> <nodeProperties/> </slave>
Please, specify if there is any HAProxy/ELB/../Firewall between the Jenkins master and the JNLP agent.
In case the JNLP agent is running as a service, stop the service and run the agent from the command line. If the issue happens randomly, then we suggest to redirect the logs to a text file so you can grab the error messages when the issue is exposed.
java -jar slave.jar -jnlpUrl http://support-cluster.cloudbees.com/master-1/computer/new-node/slave-agent.jnlp -secret 575ff66ea96bf140d3dae4fa8d7e96ba1221096678dxxxxxxd1bf1a116
Attach the full logs to the support tickets
Remoting work directory is available starting from Remoting 3.8,which is available in Jenkins 2.68). Before this version there was no working directory concept in the library itself; all operations were managed by library users (e.g. Jenkins agent workspaces).
Attach the master logs around the time the issue is exposed that you can directly find in the UI under Manage Jenkins-> System Log -> All Jenkins Logs.
Notice that the idea is to correlate the master logs with the agent logs at the time the issue is exposed.
In a Unix environment with
ps -aux and in Windows with
Get-Process from Powershell console.
In the agent box, download the CLI and run a help command in your favorite mode. For example, using http
java -jar jenkins-cli.jar [-s JENKINS_URL] -auth <user>:<token> help > cli.txt
# curl -IvL <JENKINS_URL> curl -IvL https://jenkins:8443 > curl.txt
Curl command can be available on a Windows box using for example curl Download Wizard
# telnet <JENKINS_HOST> <JNLP_PORT> telnet jenkins.host.example.com 50234 > telnet.txt