PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, September 26, 2022

[FIXED] How do I start a Jenkins agent from the slave?

 September 26, 2022     continuous-deployment, continuous-integration, jenkins, jenkins-slave     No comments   

Issue

Jenkins v2.89.3.

I'm trying to start an agent but am getting the following error.

$ java -jar agent.jar -jnlpUrl http://localhost:8080/computer/testagent/slave-agent.jnlp
Error: Unable to access jarfile agent.jar

The documentation from the wiki that I'm following is from here:

Launch agent headlessly - https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-Differentwaysofstartingagents

The handbook section for managing nodes doesn't appear to have been written yet: https://jenkins.io/doc/book/managing/nodes/

If anyone know what I'm doing wrong, or another way I can start the agent from the slave (not from the master), please let me know.


Solution

I found that the Swarm plugin for Jenkins did exactly what I needed.

  1. Install plugin on Jenkins
  2. Download swarm jar on slave
  3. java -jar path/to/swarm-client.jar -home http://localhost:8080

Result: Slave agent registers on master as seen from the Manage Nodes section of the Jenkins UI

https://wiki.jenkins.io/display/JENKINS/Swarm+Plugin



Answered By - James
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing