Error 1053 when starting Jenkins Windows service

I’m installing Jenkins and after finalizing the settings in the jenkins.xml file I’m trying to start the Jenkins service and it’s showing the following message:
“Windows cannot start the service on Local Computer.
Error 1053: Service does not respond to start or control request in a timely manner.”

I consulted some videos on the web on the subject and most ask to include a line in regedit>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control and include the Servicespipetimeout key with the value 180000 and it did not solve the problem.

Does anyone have a tip for solving the problem?
Thank you very much

Jenkins setup:

Hello @egssantana and welcome to this community. :wave:

The “Error 1053: Service does not respond to start or control request in a timely manner” is a common issue when trying to start a Windows service, including the Jenkins service. This error occurs when the service takes longer than the Windows Service Control Manager (SCM) expects to start.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Jenkins Configuration: Ensure that your Jenkins configuration is correct, including the paths and Java settings in the jenkins.xml file.

  2. Check Java Installation: Make sure that Java is installed correctly on your system and that the JAVA_HOME environment variable is set correctly. Jenkins requires a Java Runtime Environment (JRE) or Java Development Kit (JDK) 11+ to run.

  3. Check for Port Conflicts: Make sure that the port specified for Jenkins in the jenkins.xml file (default is 8080) is not in use by another application. Port conflicts can prevent Jenkins from starting.

  4. Increase Service Timeout: While you mentioned changing the ServicesPipeTimeout in the Windows Registry to 180,000 milliseconds (3 minutes), you can try increasing this value further if your Jenkins setup takes longer to start.

    • Open the Windows Registry Editor by pressing Win + R, typing regedit, and pressing Enter.
    • Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control.
    • Locate the ServicesPipeTimeout DWORD value and double-click it.
    • Set the “Base” to “Decimal” and enter a higher value, such as 300000 (5 minutes).
    • Click OK and close the Registry Editor.
  5. Check Jenkins Logs: Examine the Jenkins log files for any errors or issues that might be preventing it from starting. You can usually find Jenkins logs in the JENKINS_HOME/logs directory. Look for any exceptions or error messages.

  6. Run Jenkins in Console Mode: To gather more information about why Jenkins is failing to start, try running Jenkins in console (command-line) mode.

    • Open a command prompt with administrator privileges.
    • Navigate to the Jenkins installation directory.
    • Run the following command to start Jenkins:
      java -jar jenkins.war
  7. Monitor the console for any error messages or exceptions that might provide clues about the issue.

  8. Check System Resource Usage: Ensure that your system has sufficient resources (CPU, RAM, disk space) available for Jenkins to run. Resource constraints can cause startup delays.

  9. Antivirus/Firewall: Sometimes, antivirus or firewall software can interfere with the startup of Jenkins. Temporarily disabling or configuring exceptions in your security software can help diagnose if this is the issue.

  10. Check Windows Event Viewer: The Windows Event Viewer might have additional details about why the Jenkins service is failing to start. Check the “Application” or “System” logs for any related error messages.

You’ll want to check the Jenkins service log as well, which, if you used the default installation directory in the installer, should be in c:\Program Files\Jenkins

Thanks for the feedback, I’ll check.

Thanks for the feedback, I’ll check.

I went through the entire list and managed to start jenkins through “C:\tools\Jenkins>java -jar jenkins.war”. But the service on windows did not work.

By the way the windows service will not work.
Every time I use it I’ll have to run “C:\tools\Jenkins>java -jar jenkins.war”, not bad.
Thank you very much for your attention.

You will have to do that every time you start the system, hwich is not a good idea. Did you install using the Windows installer? Based on the path for jenkins.war it doesn’t seem so?

I installed it following the windows installation video as per the official website.

I made exactly the same settings.

Did you download the war file separately? Did you look at the log in C:\Program Files\Jenkins? That is usually the best place to look for service issues since that is where winsw (the service wrapper) writes its log.

Good morning Alex!
For installation I downloaded jenkins.msi and according to the installation instructions it asked to install in: "c:\tools\jenkins" and in this directory there are the following files: