Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins refuses to restart

Tags:

Following this answer, I have tried restarting a Jenkins instance using:

(jenkins_url)/safeRestart 

and

(jenkins_url)/restart 

Both failed with the following message:

Jenkins cannot restart itself as currently configured.

Searching for Jenkins cannot restart itself as currently configured shows that the message appears when the app.lifecycle.canRestart is on, but I am not sure how to set it.

Any idea how to make Jenkins restartable?

enter image description here

like image 534
Adam Matan Avatar asked Sep 25 '15 20:09

Adam Matan


People also ask

How long does Jenkins take to restart?

I also restarted the Jenkins service and it worked. It did take 3-4 minutes after I restarted the service for the page to load up, though. So make sure you're patient before moving on to something else.

How restart Jenkins agent Linux?

Create a job e.g. "Reboot-Slave", and set it with shell "shutdown -r -t 0", and take the target slave name as a parameter. (in this way, the restart command will be executed directly on the target slave that you want to restart.)


2 Answers

Go to Manage Jenkins links. Find the option "Install as Windows service". Click on install. Now (jenkins_url)/restart option will work. I faced this same issue now

like image 105
Shwetank Singh Avatar answered Sep 27 '22 21:09

Shwetank Singh


I installed Restart Safely plugin available in Jenkins Plugin Manager

Jenkins -> Manage Jenkins -> Manage Plugins -> Search for Safe Restart -> Install it.

Then Go to Manage Jenkins -> "Install as Windows service" -> install

Then Restart Safely appear on the Dashboard. Thanks to Shwetank Singh.

like image 43
user3840768 Avatar answered Sep 27 '22 21:09

user3840768