Jenkins‎ > ‎

Fix jenkins service not starting.

This is not a guaranteed fix  - however here goes.

A first time installation of Jenkins as windows service, would not start or starts and stops again immediately.

By first time installation I mean, jenkins had never been on the machine before, the operating system was Windows XP.

Attempting to start by hand fails:

C:\>net start jenkins
The jenkins service is starting.
The jenkins service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

but running

java -jar jenkins.war

works !

I also found  the exact same symptoms if I made the same machine a slave of another jenkins server.

Works if running with java only, but it is not possible to have the service start.

I have checked:
File system rights in jenkins folder (finally set Everyone = Full, recursively)
Added JENKINS_HOME and even JAVA_HOME environment variables
Tried the Windows installer package, to have it install the service. The installation attempts to start the service, which fails, and the installer rolls back.

All to no avail.

Fix that worked for me:

Clear the Windows eventviewer logs for Application and System

Now the service can start.


So I guess this is a problem with the service executable - which is this one WINSW for both jenkins as service as well as slave as service.