Jenkins - change master's ip

Gilad Baruchian picture Gilad Baruchian · Jun 16, 2015 · Viewed 11.1k times · Source

I had a technical problem that forced me to change my jenkins master computer. I took the hard disk and moved it to a new computer, but now the IP of the master computer changed.

The master jenkins works but the slave nodes are marked as offline, and when I try to create new nodes the installation fails on the node pc. I noticed that the error I get when creating new nodes is connection time out, and i see the old IP.

How can I fix this?

Answer

Jc Almonte picture Jc Almonte · Dec 9, 2015

I had a similar situation as the one described by Gilad, and i use the web start launch method (thanks Vitali for the comment). I solved it doing the following:

  1. In your jenkins Dashboard go to Manage Jenkins > Configure System
  2. Under Jenkins Location set the Jenkins URL to the new IP address of your server computer
  3. Save changes
  4. On jenkins dashboard under Build Executor Status click on your slave node
  5. Click launch button to download new slave agent with updated IP and save it in desired location. web start slave launch. On the picture, below the sentence "Run from slave command line" you should see a command that includes the new IP address

  6. Launch the slave agent and it should now connect to the new IP address successfully!

Hope this helps anyone else!