After upgrade Jenkins stuck with "Please wait while Jenkins is restarting"

4,138 views
Skip to first unread message

Ido Ran

unread,
Apr 15, 2012, 8:38:03 AM4/15/12
to jenkins...@googlegroups.com
Hi,
After every upgrade I do from inside Jenkins it get stuck with "Please wait while Jenkins is restarting" message.
I have to manually connect to the server stop and start it.
I use Windows 7 Pro to run Jenkins (because I build .NET application). I run Jenkins as Windows Service.

Any help will be great,
Thank you,
Ido.

Jesse Farinacci

unread,
Apr 15, 2012, 4:49:01 PM4/15/12
to jenkins...@googlegroups.com
Greetings,

On Sun, Apr 15, 2012 at 8:38 AM, Ido Ran <ido...@gmail.com> wrote:
> After every upgrade I do from inside Jenkins it get stuck with "Please wait
> while Jenkins is restarting" message.

A good starting point is:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+is+hanging

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

Chris_W...@dell.com

unread,
Apr 16, 2012, 10:52:22 AM4/16/12
to jenkins...@googlegroups.com

blaz

unread,
Apr 17, 2012, 6:57:41 AM4/17/12
to jenkins...@googlegroups.com
On Windows Jenkins has to restart service that is hosting it. What you are describing will happen when this service executes under account that does not have enough privileges to restart the service.

Check Jenkins log files (jenkins.err.log). You will probably see something like this:
29.3.2011 11:59:32 hudson.model.Hudson$18 run
WARNING: Failed to restart Hudson
java.io.IOException: Restarting a service
[service] $ D:\jenkins\service\jenkins.exe restart
WMI.WmiException: AccessDenied
   at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
   at WMI.WmiRoot.InstanceHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
   at WMI.Win32ServiceProxy.StopService()
   at winsw.WrapperService.Run(String[] _args)
   at winsw.WrapperService.Main(String[] args)

    at hudson.lifecycle.WindowsServiceLifecycle.restart(WindowsServiceLifecycle.java:131)
    at hudson.model.Hudson$18.run(Hudson.java:3074)

Simple fix is to include Jenkins account under which Jenkins executes in local Administrators group and restart service.
But proper solution is to give Jenkins account just enough privileges to restart Jenkins service (http://serverfault.com/questions/187302/how-do-i-grant-start-stop-restart-permissions-on-a-service-to-an-arbitrary-user).

You can test your configuration with Safe Restart Plugin (https://wiki.jenkins-ci.org/display/JENKINS/SafeRestart+Plugin). If this plugin is able to restart Jenkins, so should upgrade procedure.

Ido Ran

unread,
Apr 17, 2012, 7:07:53 AM4/17/12
to jenkins...@googlegroups.com
Thank you, I am running Jenkins service under account created specifically for this.
I will add the privileges and see if it fixes the problem.

Thank you,
Ido.
Reply all
Reply to author
Forward
0 new messages