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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With