I'm trying to get Jenkins installed as a service on a Windows Server 2008 Datacenter (SP2). I can't seem to get it to run as a service and am looking for any ideas to help get it going.
When I try install Jenkins with native Windows package I get "Error 1920. Service Jenkins failed to start." in msiexec logs.
I've performed the following steps for manual installation:
- Installed java 32 bit
- Started Jenkins with java -jar jenkins.war
- Gone to Manage Jenkins and set it to run as a Windows Service.
- Told Jenkins to restart itself as a service.
At this point, Jenkins dies and doesn't come back up.
When I try and manually start Jenkins I get error 1053 (service did not respond). I can't spot any log files or other information.
Any ideas or suggestions welcome, I'd also be curious to hear from anyone who has got it working on this O/S (or a windows 2003 server).
Many Thanks
I got same issue & resolved by setting up Java dir path.
I had similar problems on windows 2003 server. I had already installed .net framwork 4.0 but jenkins (v1.4.60) does not work with this framework. After installing .net framework 2.0 (v2.0.50727) the problem was resolved.
I had the same problem but for me it was a problem with the jenkins.xml configuration file. It was not proper XML and thus Jenkins could not load it properly. I found out that it was a configuration error by executing jenkins.exe in a command prompt as administrator, it gave me a proper error output.
I found the default setting of the Jenkins service to allow only 256m of HEAP. I guess they expected us to code only "Hello World". I found this after occasional
PermGen
errors. But I found that I could not correctjenkins.xml
with all of,I could only start Jenkins while setting,
Suggestion: if you can at all avoid it, do not run Jenkins as a service on Windows - you may get into all kinds of problems connected to permissions and running in the background. The downside is that it won't start automatically when the machine restarts, but more often than not one can live with that. In my experience Jenkins is very robust as far as crashing is concerned. If you want to be extra careful - write a wrapper that checks every so often that Jenkins is alive (say, via trying to connect to it via HTTP) and restarts it if it has died.
Attached is a Python script that does that (no warranties, liabilities, etc.):
Version 1.498 has stronger security which can break Jenkins Slave as a service.
https://issues.jenkins-ci.org/browse/JENKINS-16273
Recommendations include:
sc delete jenkinsslave-C__Jenkins
)<arguments>-Xrs -jar "%BASE%\slave.jar" -jnlpCredentials <user>:<password> -jnlpUrl http://<your server>/computer/<slave name>/slave-agent.jnlp</arguments>
I found deleting slave.jar and starting the web client as a logged in user worked best, you get a secret and don't need to edit the XML.
If I don't delete slave.jar that I found editing jenkins-slave.xml and removing the
secret
inarguments
works without any credentials at all (a security hole?). See jenkins-slave.errjenkins-slave.xml