Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing multiple Jenkins instances on same Windows machine caused issues

I recently saw a blog, which suggested two instances of Jenkins can run on same Windows machine: Two Guys Arguing, Pro Tips: Run Multiple Jenkins CI Servers on a Single Machine.

But rather than deploying the jenkins.war, I actually installed another Jenkins on top of already installed Jenkins on my Windows machine, Which caused the previous Jenkins to stop.

like image 538
sandejai Avatar asked Jul 02 '16 09:07

sandejai


1 Answers

I made the mistake of installing Jenkins using standard Windows installation, instead of deploying the war like:

java -DJENKINS_HOME=/path/to/configs -jar jenkins.war --httpPort=9090

which caused a change in Jenkins service's Path to executable. (Because during the 2nd Jenkins installation, I had chosen a different JENKINS_HOME_1 path.)

To make another mistake, I tried to uninstall this second installation, but Windows Jenkins service was still having exe path as JENKINS_HOME_1 (former C:/Jenkins/jenkins.exe).

To come out of this I had to change this Path to executable via:

  • Command line:

    sc config Jenkins binPath="C:\Program Files (x86)\Jenkins\jenkins.exe"
    

or

  • Registry change:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Jenkins\ImagePath="C:\Program Files (x86)\Jenkins\jenkins.exe"
    

I will try the java -jar jenkins options again though.

like image 135
sandejai Avatar answered Oct 06 '22 23:10

sandejai