47

I updated some plugins and restarted the jenkins but now it says:

Please wait while Jenkins is restarting

Your browser will reload automatically when Jenkins is ready.

It is taking too much time (waiting from last 40 minutes). I have only 1 project with around 20 builds. I have restarted jenkins many times and worked fine but now it stucks. Is there any way out to kill/suspend jenkins to avoid this wait?

Digeek
  • 849
  • 2
  • 10
  • 19

15 Answers15

21

I had a very similar issue when using jenkins build-in restart function. To fix it I killed the service (with crossed fingers), but somehow it kept serving the "Please wait" page. I guess it is served by a separate thread, but since i could not see any running java or jenkins processes i restarted the server to stop it.

After reboot jenkins worked but it was not updated. To make it work it I ran the update again and restarted the jenkins service manually - it took less than a minute and worked just fine...

Jenkins seems to have a number of bugs related to restarting, and at least one unresolved: jenkins issue

molholm
  • 1,912
  • 3
  • 23
  • 28
  • 1
    +1 I did `service jenkins restart` and that didn't help, but after rebooting the server Jenkins started up fine. – Scott Weldon Nov 18 '15 at 22:12
  • Just like windows OS , even Mac and Linux needs restart to fix issues; some times :) – vikramvi Dec 05 '16 at 13:58
  • sorry this didn't work for me, but answer from johnnynemonic did the trick. I was updating the plugin and jenkins went kapput. – vikramvi Dec 05 '16 at 15:03
17

Windows ONLY....

All the solutions here didn't work and restarting the server was not an option. If you are in the same situation.

I had to kill java.exe and restart the jenkins service. After I did this Jenkins reloaded several times and then went back to normal.

I was stuck on the jenkins restarting page for 10-ish minutes untill I did this.

Hope this helps.

TheNoob
  • 805
  • 2
  • 11
  • 25
  • I also restarted the Jenkins service and it worked. It did take 3-4 minutes after I restarted the service for the page to load up, though. So make sure you're patient before moving on to something else. – Optimus Dec 11 '18 at 12:32
7

Running this in the command line helped me:

service jenkins restart
alberto56
  • 2,759
  • 2
  • 27
  • 41
7

I had a similar issue when updating plugins from the pluging update page and I marked the restart jenkins options. jenkins only showed the waiting message for a long time.

I solved the issue restoring .bak to .jpi files of the the plugins that I tried to update.

I did the follow in my jenkins

cd $JENKINS_HOME/plugins/

>sudo mv git.bak git.jpi
.
. (more plugins files)
.
>sudo mv ldap.bak ldap.jpi

>sudo /sbin/service jenkins restart
johnnymnmonic
  • 744
  • 8
  • 11
  • This has solved for me as well, Jenkins is super buggy wrt plugin update feature. Spent 3 hrs to come to this solution. Thanks a ton @johnnynemonic – vikramvi Dec 05 '16 at 14:59
  • This worked for me! this answer needs more upvotes! It only worked after I restored *ALL* .bak files – Doug Apr 10 '18 at 15:34
2

Check Event Viewer.

I found that my Java died.

Faulting application java.exe, version 7.0.250.17, time stamp 0x51c4b3fd, faulting module ntdll.dll, version 6.0.6002.18541, time stamp 0x4ec3e39f, exception code 0xc0000374, fault offset 0x000abc4f, process id 0x1188, application start time 0x01cee4f42968bc81.

Finally I found that it's Jenkins 1.540 problem. Don't use it. https://issues.jenkins-ci.org/browse/JENKINS-20630

gunr2171
  • 12,476
  • 25
  • 58
  • 80
Der_Meister
  • 4,651
  • 2
  • 40
  • 51
1

just performed a restart on the server. That fixed the issue !

Nabeel A.Rahman
  • 181
  • 3
  • 14
1

In Command prompt execute this

C:\>service jenkins restart

Or

You can go for Service currently running in your machine( Win + R ) seach for Jenkins and Click on restart

enter image description here

Lova Chittumuri
  • 2,427
  • 1
  • 25
  • 27
1

For me, the cause seemed to be having lots of old job build logs hanging around. To clean them up, I ran:

cd $JENKINS_HOME/jobs
find -name 'builds' | xargs -n 1 bash -c 'rm -rf $0/[1-9]*'

Then I stopped and started Jenkins again, and it came up within a minute.

Credit to: https://stackoverflow.com/a/39230597/2255242

Jack Davidson
  • 3,893
  • 2
  • 27
  • 31
0

On Win 10: Stopping with the service command from the command line reported failure to stop the service, but I was able to stop it from services.msc (running as administrator). The updates were applied. Sorry, no definitive answer from me. YMMV.

Jason Young
  • 398
  • 1
  • 6
  • 18
0

I faced the same issue after upgrading some plugins on Windows. Looking on jenkins.err.log it displayed this error

Exception in thread "main" java.io.IOException: Jenkins has failed to create a temporary file in C:\Users\builder\AppData\Local\Temp\
    at Main.extractFromJar(Main.java:350)
    at Main._main(Main.java:194)
    at Main.main(Main.java:91)
Caused by: java.io.IOException: There is not enough space on the disk
    at java.io.WinNTFileSystem.createFileExclusively(Native Method)
    at java.io.File.createTempFile(Unknown Source)
    at Main.extractFromJar(Main.java:347)
    ... 2 more

The problem was that the TEMP folder of the jenkins user had lots of temporary files. After cleaning that folder jenkins restarted correctly.

Andres
  • 81
  • 6
0

I used TCPView and killed process that was using port 8080. BAsically it was all Java.exe from Jenkins. Killed all processes and restarted Jenkins Service

SamirBhatt
  • 56
  • 5
0

try to restart that inside windows services console, it will work

enter image description here

kaisfarza
  • 63
  • 1
  • 7
0

I have observed the same issue after installing a plugin and opting to restart the jenkins when no jobs are running. When I looked at the jenkins server process, it was running fine and no issues. On restarting the jenkins service using the below command and reloading the browser, Jenkins was up.

sudo service jenkins restart
Dinesh
  • 261
  • 3
  • 7
0

i try to fix a file named hudson.model.UpdateCenter.xml located /var/lib/jenkins

I change the URL to https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

finnal restart jenkins . it solves my ploblem

0

This is an old thread.. but my personal recommendation is to WAIT before attempting to do anything (such as restarting service, etc).

I wasted hours once trying to fix something that turned out to be not an issue in the first place. In the end, I messed things up and wasted a lot of time.

Just because you see errors in the logs doesn't necessarily mean that you need to take action.

The upgrade took about 45 minutes in the end for me. All i did at one point was refreshing my browser window. It can take a while.

Just my opinion

xav
  • 774
  • 7
  • 9