Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error - Jenkins detected running multiple instances

Tags:

jenkins

hudson

I am running Jenkins as windows service. It was all good, suddenly from today noon I started seeing the following error while opening it.

Jenkins detected that you appear to be running more than one instance of Jenkins that share the same home directory '’. This greatly confuses Jenkins and you will likely experience strange behaviors, so please correct the situation.

This Jenkins: 17485453 contextPath="" at 1264@< MachineName >
Other Jenkins: 15621395 contextPath="" at 13424@< MachineName >

How this occurs? Any help to solve this?

Any help is appreciated !!

like image 343
prakashjv Avatar asked Jan 31 '14 13:01

prakashjv


2 Answers

Stop your Jenkins service. Then use the Windows task manager or better the Sysinternals Process Explorer to kill all Jenkins processes. The numbers at the beginning of "1264@< MachineName >" and "13424@< MachineName >" indicate the id of the processes you need to kill. After that you should be able to start the Jenkins service again.

like image 88
Fabian Ritzmann Avatar answered Sep 18 '22 15:09

Fabian Ritzmann


MacOS Solution for others directed to this question not on Windows:

Here is the error message I saw when I ran into this issue on MacOS: enter image description here

Here are the specs for that machine (if relevant): enter image description here

Despite the scary error message I was actually able to ignore this warning and use Jenkins for a month without noticing any catastrophes, but I'm sure mileage may vary.

I do not know what caused this condition initially.

Note: a search for "Jenkins" in the Activity Monitor reveals nothing, enter image description here

Using top is not that useful either. No Jenkins here… I do see a random Java process, which could be related, but we can’t be sure yet, enter image description here

Changing the search in the Activity Monitor to "Java" gives me what I want enter image description here

On the right side you can see my two Java processes, on the left side you can see that their PIDs match exactly the ones mentioned in the error message shown in the browser. A very nice indicator that we are not chasing some stray Java process. I especially don't want to kill a Java process that I don't know what it is doing.

I click the "Ignore this problem and keep using Jenkings anyway" button in the Browser to go to Jenkins GUI that I normally use.

I start using Jenkins, I actually start a build, so I can see which instance actually gets used. Logically, it’s CPU usage should go up in the Activity Monitor enter image description here

Cool. So I’m gonna keep the top one and trash the bottom one not being used. You can see that the top one is now using 0.2 or 20% of the available CPU.

Problem solved. As far as figuring out how both of them got spun up, that’s another issue. It’s probably related to how you installed and configured it, if you installed it twice, etc.

like image 34
sitting-duck Avatar answered Sep 19 '22 15:09

sitting-duck