Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6063679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:11:42+00:00 2026-05-23T09:11:42+00:00

I have a Jenkins (Hudson) server setup that runs tests on a variety of

  • 0

I have a Jenkins (Hudson) server setup that runs tests on a variety of slave machines. What I want to do is reconfigure the slave (using remote APIs), reboot the slave so that he changes take effect, then continue with the rest of the test. There are two hurdles that I’ve encountered so far:

  1. Once a Jenkins job begins to run on the slave, the slave cannot go down or break the network connection to the server otherwise Jenkins immediately fails the test. Normally, I would say this is completely desirable behavior. But in this case, I would like for Jenkins to accept the disruption until the slave comes back online and Jenkins can reconnect to it – or the slave reconnects to Jenkins.
  2. In a job that has been attached to the slave, I need to run some build tasks on the Jenkins master – not on the slave.

Is this possible? So far, I haven’t found a way to do this using Jenkins or any of its plugins.

EDIT – Further Explanation
I really, really like the Jenkins slave architecture. Combined with the plugins already available, it makes it very easy to get jobs to a slave, run, and the results pulled back. And the ability to pick any matching slave allows for automatic job/test distribution.

In our situation, we use virtualized (VMware) slave machines. It was easy enough to write a script that would cause Jenkins to use VMware PowerCLI to start the VM up when it needed to run on a slave, then ship the job to it and pull the results back. All good.

EXCEPT Part of the setup of each test is to slightly reconfigure the virtual machine in some fashion. Disable UAC, logon as a different user, have a different driver installed, etc – each of these changes requires that the test VM/slave be rebooted before the changes take affect. Although I can write slave on-demand scripts (Launch Method=Launch slave via execution of command on the master) that handle this reconfig and restart, it has to be done BEFORE the job is run. That’s where the problem occurs – I cannot configure the slave that early because the type of configuration changes are dependent on the job being run, which occurs only after the slave is started.

Possible Solutions
1) Use multiple slave instances on a single VM. This wouldn’t work – several of the configurations are mutually exclusive, but Jenkins doesn’t know that. So it would try to start one slave configuration for one job, another slave for a different job – and both slaves would be on the same VM. Locks on the jobs don’t prevent this since slave starting isn’t part of the job.

2) (Optimal) A build step that allows a job to know that it’s slave connection MIGHT be disrupted. The build step may have to include some options so that Jenkins knows how to reconnect the slave (will the slave reconnect automatically, will Jenkins have to run a script, will simple SSH suffice). The build step would handle the disconnect of the slave, ignore the usually job-failing disconnect, then perform the reconnect. Once the slave is back up and running, the next build step can occur. Perhaps a timeout to fail the job if the slave isn’t reconnectable in a certain amount of time.

** Current Solution ** – less than optimal
Right now, I can’t use the slave function of Jenkins. Instead, I use a series of build steps – run on the master – that use Windows and PowerShell scripts to power on the VM, make the configurations, and restart it. The VM has a SSH server running on it and I use that to upload test files to the test VM, then remote execute them. Then download the results back to Jenkins for handling by the job. This solution is functional – but a lot more work than the typical Jenkins slave approach. Also, the scripts are targeted towards a single VM; I can’t easily use a pool of slaves.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:11:42+00:00Added an answer on May 23, 2026 at 9:11 am

    Very easy. You create a Master job that runs on the Master, from the master job you call the client job as a build step (it’s a new kind of build step and I love it). You need to check that the master job should wait for the client job to finish. Then you can run your script to reconfigure your client and run the second test on the client.

    An even better strategy is to have two nodes running on your slave machines. You need to configure two nodes in Jenkins. I used that strategy successfully with a unix slave. The reason was that I needed different environment variables to be set up and I didn’t wanted to push that into the jobs. I used ssh clients, so I don’t know if it is possible with different client types. Than you might be able to run both tests at the same time or you chain the jobs or use the master strategy mentioned above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bare-bones install of jenkins on my Ubuntu server that I installed
I have a project that I've added to my Jenkins server. The project includes
We have a Jenkins task that runs overnight and compiles a project group containing
Is there any CI server (CruiseControl, Jenkins, Hudson, ...) that supports a proper DAG
I am using jenkins with hudson cli through java. I want clean a particular
I have a GIT repository on bitbucket, which I want my Jenkins Server to
I have following jenkins setup - master node on centOS, slave node on windows
I have a job in Jenkins that it testing nunit tests for a project.
PROBLEM Let's say I have a jenkins/hudson job (for example free-style) that takes two
I have Jenkins setup using git and use a github hook for continuous integration.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.