2

I am using jenkins 2.319 version on my local Centos 7.0 machine. When I am adding a new slave agent/node to my Jenkins server I can see that its copying the remoting.jar file from the controller to the slave node but i could not see the remoting.jar file on my master server. Can any1 help me in locating this file on my controller node.

[03/08/22 01:20:42] [SSH] Starting agent process: cd "/var/jenkins" && java  -jar remoting.jar -workDir /var/jenkins -jar-cache /var/jenkins/remoting/jarCache
Mar 08, 2022 6:20:58 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /var/jenkins/remoting as a remoting work directory
Mar 08, 2022 6:20:58 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /var/jenkins/remoting

2 Answers2

0

It appears to be bundled in the jenkins.war file.

On my jenkins installation there was a copy of the jenkins.war file already extracted at:
/var/lib/jenkins/%C/jenkins/war/
and the remoting jar can be found in:
/var/lib/jenkins/%C/jenkins/war/WEB-INF/lib/remoting-[version].jar

There was also the unextracted war file available at:
/usr/share/java/jenkins.war
which you can unzip into a directory and then find the remoting jar at:
WEB-INF/lib/remoting-[version].jar

Andrew Davison
  • 382
  • 3
  • 11
  • This is the same file that will be downloaded on `http://my_ip:8080/jnlpJars/agent.jar` –  Apr 28 '23 at 09:06
0

When you configure a new Permanent node that is to be manually connected, Jenkins will give you this page with instructions how to connect the node

Run from agent command line: (Unix)

curl -sO https://jenkins-url/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl https://jenkins-url/computer/jenkinsAgentName/jenkins-agent.jnlp -secret 4172ee4968xxx4cf888 -workDir ""

Run from agent command line: (Windows)

curl.exe -sO https://jenkins-url/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl https://jenkins-url/computer/jenkinsAgentName/jenkins-agent.jnlp -secret 4172ee4968xxx4cf888 -workDir ""

Or run from agent command line, with the secret stored in a file: (Unix)

echo 4172ee4968xxx4cf888 > secret-file
curl -sO https://jenkins-url/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl https://jenkins-url/computer/jenkinsAgentName/jenkins-agent.jnlp -secret @secret-file -workDir ""

Or run from agent command line, with the secret stored in a file: (Windows)

echo 4172ee4968xxx4cf888 > secret-file
curl.exe -sO https://jenkins-url/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl https://jenkins-url/computer/jenkinsAgentName/jenkins-agent.jnlp -secret @secret-file -workDir ""
user7610
  • 25,267
  • 15
  • 124
  • 150