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.

On Tue, Apr 17, 2012 at 1:57 PM, blaz <blaz.lor...@comtrade.com> wrote:

> 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.
>
>
>
> On Sunday, April 15, 2012 2:38:03 PM UTC+2, Ido Ran wrote:
>>
>> 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.
>>
>

Reply via email to