0

So I installed Jenkins on my Windows machine, I had it working fine and was setting up my first pipeline when I got an error message about need to set Dhudson.plugins.git.gitscm.allow_local_checkout=true for local repositories. Did some googling and thought that maybe I could define it in the Jenkins.xml file in the Jenkins directory. ran Jenkins.exe stop to stop the service, made the change in Jenkins.xml then I ran Jenkins.exe start only for it to not start.

Did some more googling and found that I can run this command in command prompt by passing arguments to Java. I copy the command in Jenkins.xml and run

Java -Xrs -Xmx256m -Dhudson.plugins.git.gitscm.allow_local_checkout=true -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "E:\Jenkins\jenkins.war" --httpPort=82 --webroot="%LocalAppData%\Jenkins\war

It run first time set-up again basically doing a fresh install, not a big deal I had just installed it anyways so it is not like I really lost anything. However now I cannot get Jenkins to start with out running the above command. It doesn't try to re-install again but here I sit having to leave a command prompt window open less it stops the Jenkins Service.

Does anyone know how I can stop this behavior? Sure I can re-install it, but I feel like I shouldn't have to and I don't want to be in a loop when trying to allow local git repos anyways.

All I wanted was to have a pipeline build a local repo and deploy it to nginx locally. I feel like that shouldn't be too hard.

*** EDIT ***

I tried creating my own service, to no avail. sc.exe create Jenkins_Service binPath= "Java -Xrs -Xmx256m -Dhudson.plugins.git.gitscm.allow_local_checkout=true -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "E:\Jenkins\jenkins.war" --httpPort=82 --webroot="%LocalAppData%\Jenkins\war""

I also noticed when trying to start the new custom Service I see the old Jenkins Service and I cannot start it, it says Process Terminated Unexpectedly. same message with my custom service.

Screenshot of Services

*** EDIT 2 ***


Okay I got a new error message. I went into the Log On for the Service that I made and set it to use my username (I had already set my account as a service account when I had previously installed Jenkins) and now I get the error message Service did not start in a timely fashion

*** EDIT 3 ***

Now I am entirely unable to run Jenkins. I uninstalled the application and attempted a to reinstall and I keep getting "Jenkins setup wizard ended prematurely because of an error..."

I cannot get past this error.

3
  • Jenkins generic package comes as a .war. I would install it on a tomcat (and tomcat get installed as service on Windows out of the box, I'm on Linux ...).
    – PeterMmm
    Commented Aug 13, 2023 at 18:32
  • I tried creating my own service and that didn't work. I see the old service there and it won't start. Exits unexpectedly. Commented Aug 13, 2023 at 18:39
  • 1
    Probably bad idea to move from S/O to S/U cos the answer is there. Add the parameters (in the right location) to the Jenkins.xml, stop and delete the original service and re-create.
    – Ian W
    Commented Aug 14, 2023 at 7:35

0

You must log in to answer this question.

Browse other questions tagged .