Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restart Jenkins in Windows

Not able to restart Jenkins manually. Already tried all below ways:

  1. http://localhost:8080/safeRestart
    Error message: Jenkins cannot restart itself as currently configured.

  2. Manage Jenkins → Restart Safely Plugin.
    Error message: Jenkins cannot restart itself as currently configured.

  3. Not able to find any Jenkins Service in services.msc.

  4. Navigate to jenkins-cli directory in CMD mode

    java -jar jenkins-cli.jar -s http://[jenkins-server]/ restart
    

    See below screenshot for error message:

    x

like image 652
Rodger Nadal Avatar asked May 25 '17 07:05

Rodger Nadal


People also ask

Which command will restart Jenkins server?

[jenkins_url]/safeRestart - This will restart Jenkins after the current builds have completed. [jenkins_url]/restart - This will force a restart.

What command is used to start Jenkins?

Run the command java -jar jenkins. war . Browse to http://localhost:8080 and wait until the Unlock Jenkins page appears.


2 Answers

Use command line to stop and start

net stop jenkins
net start jenkins
like image 61
Hoang Avatar answered Oct 16 '22 20:10

Hoang


Simply just do one thing.To restart Jenkins manually, you can use either of the following commands on Windows platform.

  • Clean the "AppData\Local\Temp" folder.
  • In search of windows type %temp%. then clean the folder.

Then try restarting Jenkins.

  • use java -jar jenkins.war --httpPort=8080 in cmd fo windows.
  • otherwise change the Port number.
  • java -jar jenkins.war --httpPort=8090

It worked for me!

like image 4
Tushar Hanwate Avatar answered Oct 16 '22 20:10

Tushar Hanwate