MBU
MBU

Reputation: 5098

Hudson build server install as a windows service error

Problem

I am trying to install hudson build server on a windows server through remote desktop connection. I path to the Hudson folder in the C:\Hudson. The Hudson directory contains a folder called Home and the hudson.war file.

I tried to start it up using the following commands:

set JAVA_HOME=C:\Java\jdk1.6.0_20
set HUDSON_HOME=C:\Hudson\Home
java -jar C:\Hudson\hudson.war

Then I can navigate to http://localhost:8080 in internet explorer.

Question

When I try to use the Install as Windows Service function on the web interface, I get this error:

Installing a service
[Home] $ C:\Hudson\Home\hudson.exe install
WMI.WmiException: AccessDenied
   at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
   at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
   at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType ,     ErrorControl , StartMode , Boolean , String[] )
   at winsw.WrapperService.Run(String[] args)
   at winsw.WrapperService.Main(String[] args)`

Why can't I install as a windows service and how can I fix this issue?

Upvotes: 2

Views: 5956

Answers (3)

twasbrillig
twasbrillig

Reputation: 18821

Try turning off User Account Control; that's what fixed it for me. Start > Run > UAC, then drag the dial to the lowest setting: "Never notify". May require a reboot.

Upvotes: 0

Aakash Gandhi
Aakash Gandhi

Reputation: 55

On the windows command prompt, execute: sc delete hudson and for jenkins user, execute: sc delete jenkins

and then run install windows as a service. Hope it helps :)

Upvotes: 0

MBU
MBU

Reputation: 5098

Answer

Found the solution.

When running the commands you need to open the command prompt by right clicking and selecting "run as administrator".

Upvotes: 3

Related Questions