Required Data: JNLP dedicated agents

Article ID:115000582272
2 minute readKnowledge base

Issue

Any kind of communication issue between Jenkins controller and a dedicated JNLP agent.

Required Data JNLP dedicated agents

This article describes how to collect the minimum required information for communication issues between a Jenkins controller and an agent so that it can be efficiently troubleshooted.

If the required data is bigger than 50 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.

Environment

  • CloudBees Jenkins Platform (CJP)

  • Operations Center (OC)

  • Client controller (CM)

  • CloudBees Jenkins Enterprise (CJE)

Required Data check list

[ ] Support bundle [ ] Agent name [ ] Agent config.xml [ ] Agent logs [ ] controller logs [ ] Process lists in the JNLP agent machine [ ] Connectivities checks

Support bundle

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.

Agent name

The name of the agent under Manage Jenkins -> Manage Nodes

Agent config.xml

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 https://<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>

HAProxy / ELB / Firewall ?

Please, specify if there is any HAProxy / ELB / Firewall / …​ between the Jenkins controller and the JNLP agent.

Agent logs

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 agent.jar -jnlpUrl https://support-cluster.cloudbees.com/master-1/computer/new-node/jenkins-agent.jnlp -secret 575ff66ea96bf140d3dae4fa8d7e96ba1221096678dxxxxxxd1bf1a116
rd-jnlp-agent-command-line.png

Attach the full logs to the support tickets

Agent logs

Remoting work directory

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).

controller logs

Attach the controller 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 controller logs with the agent logs at the time the issue is exposed.

Process lists in the JNLP agent machine

In a Unix environment with ps -aux and in Windows with Get-Process from Powershell console.

Connectivities checks

Use jenkins-cli to check the connection

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

Check that the agent is able to see the JENKINS headers

# curl -IvL <JENKINS_URL> curl -IvL https://jenkins:8443 > curl.txt

The curl command can be installed from your OS package manager on Linux, or on Windows you can download it from https://curl.se/.

Check that the inbound TCP port of the controller is accessible from the agent

nc -z CONTROLLER_HOSTNAME TCP_PORT # or using telnet # telnet CONTROLLER_HOSTNAME TCP_PORT