How to install Jenkins on Windows Server 2012

16,600

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.

Solution 3

I found a solution based on this answer by Jan The issue is that Windows is looking for the certificate for the service and your server does not have access to the Internet. Your best option is to enable Internet access to the server for the installation of Jenkins. You wont need it once Jenkins is installed.

You could also try to disable certificate checking this way (though I'm unsure if this will work.)

1) Create the directory: C:\Program Files (x86)\Jenkins

2) Create a text file named jenkins.exe.config

3) Add the following text to the text file:

<configuration> 
  <runtime> 
     <generatePublisherEvidence enabled="false"/> 
  </runtime> 
</configuration>

4) Run setup as an Administrator

Share:
16,600

Related videos on Youtube

HaMster
Author by

HaMster

Updated on September 18, 2022

Comments

  • HaMster
    HaMster over 1 year

    This may sound like a trivial question but here is what is happening:

    1. I grab the latest version of Jenkins as native installer for Windows (1.491 in my case)
    2. I set up a Windows Server 2012 (official release image, no release candidate) and install all updates
    3. 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.

  • HaMster
    HaMster over 11 years
    I thought of the same thing and I do handle it this way now. However I want to give some guys new to the topic a quick intro and it would be nice if Jenkins was working. I guess I'm going to make them aware of this issue or get involved myself. But thank you for the hint.
  • nabisorry
    nabisorry over 11 years
    Please, write back, if a better solution is found, or if you finally get them to fix this. I had to live with this for over two years at my previous job and it was annoying. The JNLP installer doesn't really work out of the box in a lot of cases (this being one of them). I think that instead of them trying to use the stupid DLL-s of Windows, they should like... invoke a command-line script that either adds it as a service, or creates a scheduled job. I believe this should be fairly easy.
  • HaMster
    HaMster over 11 years
    I never had any problems with the native installer on windows that is provided on the download board at Jenkins-Homepage. The first time I haven't finished the installation successfully was in the case described above, even if I gave it several tries with different scenarios. So as I said I guess this is a Server 2012 specific problem
  • nabisorry
    nabisorry over 11 years
    Oh, I've seen this on Windows Server 2008 every time. For sure.
  • HaMster
    HaMster over 11 years
    I don't know why, but the .NET Framework 3.5 seems to be the only requirement missing... Thank you for this hint, that is fixing the original problem
  • HaMster
    HaMster over 11 years
    Wich edition of Windows Server 2012 were you running? I never had to do that on my Standard edition.
  • Ben Cull
    Ben Cull over 11 years
    Windows Server 2012 Datacentre - Although I thought it was mainly our network architecture that broke things rather than the edition itself.
  • Serj Sagan
    Serj Sagan about 11 years
    It's a Windows Server not having Internet access issue
  • BenjiWiebe
    BenjiWiebe about 11 years
    You really shouldn't post links, how about just copy-and-paste your other answer here?
  • Serj Sagan
    Serj Sagan about 11 years
    Ok... this is done
  • ashes999
    ashes999 almost 11 years
    Copy/paste answers are generally discouraged if they're not sourced/cited properly (it falls under plagiarism).