'Jenkins failed to start - Verify that you have sufficient privileges to start system services
When installing Jenkins (LTS) on windows 10 via the installer, after choosing the JDK folder - an error pops when the service is trying to start.
The error reads: "Jenkins failed to start - Verify that you have sufficient privileges to start system services"
Let me make it clear that I DO have sufficient privileges, yet something is not working.
I tried many different suggestions to fix this issue, and read many posts but none helped. Also, a lot of these posts are getting old and I'm not sure how relevant they are these days.
I found a way to fix this issue, and I'll post it as a suggested answer. This could also work for other installers, but it was only tested with the Jenkins installer.
However, if anyone knows a better way to fix this - please share it with us.
Hope this method will help many people!
Solution 1:[1]
Important: If you retried the installation too many times, skip down to "Option 2". The local user account that runs Jenkins may be locked. You will need to unlock that account before attempting either fix below.
This is how I fixed the problem.
Option 1: Re-enter credentials for jenkins user
Please read it all before executing and follow the steps in order:
- Delete any Jenkins installation leftovers you currently have
- Start the installation process, input your credentials when asked, and continue with the on-screen instructions (including choosing the JDK folder) up until the point where the error is raised.
- When the error is raised, >>> DO NOT DO ANYTHING! <<< leave it as it is shown in my question
- Now (and only now), open "Services"
- Search for the "Jenkins" service. It should be set to "Automatic", but it might be "Disabled"
- Open the "Jenkins" properties, and go to the "Log On" tab
- Make sure you choose the "This account" radio button, delete the account name and password fields, and enter them AGAIN
- Click "Apply"
- Go back to the installer and click "Retry"
If everything is according to plan - The installation will now continue without a problem.
This method was tested on a local and VM / AWS computer and worked!
If you still encounter a problem, try changing the startup in step 5 to "Automatic" and make sure you only open "Services" on step 4. "Services" will not update while it is open.
Option 2: Unlock jenkins user account and manually start service
If you encounter the "Service 'Jenkins' failed to start" error too many times, the account on your computer that should run Jenkins will become locked. You will need to unlock that local account first. Keep the Jenkins installation window open with the error message, and then perform the following steps:
- Open the "Local Users and Groups" application.
- Go into the "Users" folder.
- Right-click on the user who will run the Jenkins service, and click "Properties".
- Uncheck "Account is locked out". And while you are at it, make sure "Account is disabled" is unchecked as well.
- Click OK.
- Open the "Services" app on your computer.
- Make sure the Jenkins service is set to start automatically.
- Right-click the Jenkins service and click "Start". The service should start successfully.
- Switch back to the Jenkins installation window with the "insufficient privileges" message still showing.
- Click the "Retry" button in the "insufficient privileges" message box. The installer should recognize that the Jenkins service has started.
You should be able to finish the installation.
Solution 2:[2]
It didn't work for me until I installed Java Runtime Environment (JRE) 11.
Solution 3:[3]
For me wasn't working because java installed was jre-8u301-windows-x64.exe
I installed x86, jdk-8u301-windows-i586.exe and it worked
Solution 4:[4]
I had the same issue, I have both jre8, jdk 8 and jdk 11 corretto, I think there are some compatibility issues using these versions of java. I was able to fix it by installing jre mentioned above by @maksym which is this. The Jenkins versions that I am trying to install are 2.332.2 LTS and 2.345. I am able to successfully install 2.332.2 LTS
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | E_net4 - Krabbe mit Hüten |
Solution 2 | Maksym Muzyka |
Solution 3 | Carlos |
Solution 4 | Cathleen Sy |