Jenkins File menu is missing so cannot install slave as a service

We have already discussed Jenkins Windows slave configuration where we have seen how to configure windows slave and install windows service for the agent but sometimes due to browser issue or some unknown factors you are not getting the Jenkins File menu. It will stop you from creating windows service for this newly created Jenkins agent.

jenkins file menu missing - DevOpsBuzz

Though this popup confirms the connection has been established but there is no menu available to start this is as a service which we have seen our last article. This could be a tedious task to do since you might have tried several times on different browser but you are getting the same error. You will get the Slave connection page as below :

jenkins file menu missing 1a - DevOpsBuzz

So, we can’t just wait for some magic to be happen, we have to manually create the window service which will allow us to manage the service from windows services and then we can stop/start/restart the Jenkins slave as and when required.

We are going to use windows service creation utility “sc” to perform this operation, as shown below :

* sc : Service Control – An utility to create, start, stop, query or delete any windows services.

C:\Jenkins>sc create binPath=ProjJenkinsSlaveStartup.bat DisplayName=JenkinsSlaveTECR

jenkins file menu missing 2 - DevOpsBuzz

If it is throwing an error in conventional method as shown in above screenshot, we need to provide the absolute path for the command and jenkins startup batch file,  so run the command as below:

C:\Jenkins>sc create jenkins binPath= "C:\Windows\System32\cmd.exe /C C:\Jenkins\ProJenkinsSlaveStartup.bat

jenkins file menu missing 3 - DevOpsBuzz

Once you provide the accurate path and fire the command it will create a windows service for you.

Now go to Windows Settings and then to open the Windows Services and then locate the Jenkins service.

You can also see the status of the service, since it is a new service its in a stopped state and we have to start it.

Click on Start

jenkins file menu missing 4 - DevOpsBuzz

You can now manage your Jenkins slave/agent process through windows services. It is very useful and manageable when it comes to manage the Jenkins slave on Windows machine.

Go back to your Jenkins Slave Page and now you will see that Agent is Successfully Running and ready to build your project.

jenkins file menu missing 5 - DevOpsBuzz

You have successfully resolved the Jenkins file menu issue and created/installed windows service for your Jenkins Slave on Windows Machine.

Happy learning …..

13 thoughts on “Jenkins File menu is missing so cannot install slave as a service”

  1. Arturo Rodriguez

    I followed the steps but then encounter an issue when starting the server that says “Windows could not start the jenkins service on Local Computer” Error 1053: The service did not respond to start or control request in a timely fashion”

    1. Hi Arturo,

      Sorry for delay in reply. Couldn’t check last weekend comments.

      If you are still facing the same error, then please could you let me know below and we will try to sort it out together.
      – What is version of Jenkins ?
      – On which step you are facing this error ?
      – Did you check the Jenkins slave logs, if yes then did you find more info ?
      – Are you building it under restricted firewall ?
      – Do you have admin privilege on the Windows machine ?

      Any other details will add more help towards it – thanks in advance

  2. Hi Ravi,
    I followed the above steps but i am still getting an below issue.
    “Windows could not start the jenkins service on Local Computer” Error 1053: The service did not respond to start or control request in a timely fashion”

    Could you please help me to resolve this issue?

    1. Hi Naveen,

      Can you please verify if the given port is occupied by any other service or not ? And the user has all the required permissions ? Firewall open ?
      Also you could try with adding a register entry for HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control “ServicesPipeTimeout” with the value of 180000 ms.
      Please do post Jenkins logs and other errors in case this doesn’t solve your issue

      1. Ravi, I am also seeing the same error. I am using Jenkins version 2.222.1. I don’t see any logs in the folder where I am starting the slave. Please let me know where to check the jenkins slave log. I am able to start the batch file manual but get the error while trying to start from service.

        1. Hi Sarath,

          Thanks for your query and apologies for delayed response (I was on leave)

          For windows slaves, Jenkins store the slave error logs in the same folder where you have slave.jar file
          Please could you check logs at : \jenkins-slave.wrapper.log and \jenkins-slave.err.log

  3. How can I configure the startup option for jenkins slave service ? I want it to start with a list of specific labels.

    thanks

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top