Chris Hansen
Chris Hansen

Reputation: 8645

Windows Jenkins slave issues

I upgraded to the latest version of Jenkins, and now when I try to run a Jenkins build on a Windows slave I get the error: Unable to find a suitable SSH agent.

I followed the instructions here: https://issues.jenkins-ci.org/browse/JENKINS-28279

But they no longer work. I'm using Jenkins version 2.33

Upvotes: 0

Views: 2025

Answers (1)

Andrew Gray
Andrew Gray

Reputation: 3651

My suggested set up:

Install Jenkins Master as a Windows Service.

On the Master:

  1. Navigate to Nodes.
  2. Create a new node and give it a name like Node.
  3. Set Description to "Slave for Deployments to "
  4. Set # Executors to 5
  5. Set Directory to C:\JenkinsSlave

On the Slave machine:

  1. Open a browser to Jenkins Master URL
  2. Navigate to Nodes > <New Slave Name>
  3. Click the Launch button. A new (small) browser window will open.

    ALTERNATE - If launch button wants to download slave-agent.jnlp

    a) Save slave-agent.jnlp to c:\temp on slave machine

    b) Ensure Java 1.8_66 is installed and %JAVA_HOME%\bin is in the Path (NOTE: %JAVA_HOME% may not work so you may have to put the full path to Java in the Path)

    c) Open an Administrator Command Prompt and navigate to c:\temp

    d) Type javaws -verbose c:\temp\slave-agent.jnlp

    e) Accept the "Do you want to run" dialogs

    f) When the browser window pops up select "Install as a Windows service" from the file menu

    g) If installation fails due to access rights you will need navigate to C:\JenkinsSlave and type jenkins-slave.exe install

  4. Select File > "Install as a windows service"

  5. Go to Services > JenkinsSlave and open properties
  6. Set Logon details appropriately and restart.

If "Install as a windows service" fails

On the slave machine:

  1. Open an adminstrator Command Prompt
  2. Change directory to C:\JenkinsSlave
  3. Execute "slave.exe install" (without the quotes)
  4. Return to step 5. above.

Upvotes: 1

Related Questions