How to install Jenkins on Windows Server 2012
This may sound like a trivial question but here is what is happening:
- I grab the latest version of Jenkins as native installer for Windows (1.491 in my case)
- I set up a Windows Server 2012 (official release image, no release candidate) and install all updates
- I try to run the Jenkins installation.
Everything is working fine in the installation process except for the part where it tries to start the service. At this point I get informed that I have not sufficient privileges to start system services. This has been working on 2k8R2 without any problems. I am logged on as Administrator which was created during server installation and is the only user on the machine.
The full message I get is:
Service 'Jenkins' (Jenkins) failed to start. Verify that you have sufficient privileges to start system services.
Is anybody else having these problems? I guess the internals of Server 2012 have changed the way of the installation and the Jenkins installer is not build for that.
If anyone can tell me to which group I have to add the administrator, or can give me a work-around for this problem, this will help a lot.
Solution 1:
You need to install .net 3.5 (Even if you have .net 4+ installed)
You do this through the Server Manager:
- Configure local server
- Add roles and features
- Click next until you get to the features section
- Check the .net 3.5 check box (I also checked the sub items for good measure)
- If you get a warning about needing to Specify an alternate path, then:
- Insert your windows installation media.
- Click Specify an alternate source path
- Put D:\sources\sxs in the path field (click Ok)
- Click Install
Once you have done this you should be able to install Jenkins through the msi installer. It will be able to successfully start the Jenkins service now.
I think Jenkins tries to install .net 3.5, but because the install media was 'missing' it hangs (as it is running in the background) and that is why it actually times out
Solution 2:
I've done it finally!
Not only did I need to install .NET 3.5 (Thankyou DarcyThomas) but I also found out that I needed to add a configuration file to the installation directory as well.
Add a file called jenkins.exe.config with the following contents to the installation directory:
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
It turns out that when starting the service, Windows tries to hit the internet to download a certificate to confirm the signer of the executable. So in my case where the server does not have internet access, it fails. I found the solution here.
I hope this saves everyone else the hours of pain I've just been through. Cheers.